projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0197a7c
)
rtc: omap: Do not check for 0 return after calling platform_get_irq()
author
Ruan Jinjie
<ruanjinjie@huawei.com>
Thu, 3 Aug 2023 08:07:12 +0000
(16:07 +0800)
committer
Alexandre Belloni
<alexandre.belloni@bootlin.com>
Wed, 16 Aug 2023 23:17:34 +0000
(
01:17
+0200)
It is not possible for platform_get_irq() to return 0. Use the
return value from platform_get_irq().
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Link:
https://lore.kernel.org/r/20230803080713.4061782-2-ruanjinjie@huawei.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-omap.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-omap.c
b/drivers/rtc/rtc-omap.c
index 8ae4d7824ec9f7b77fd2d8511743ca93625b857a..5b10ab06cd2e2fa7df95808768fc4606b674b08c 100644
(file)
--- a/
drivers/rtc/rtc-omap.c
+++ b/
drivers/rtc/rtc-omap.c
@@
-747,12
+747,12
@@
static int omap_rtc_probe(struct platform_device *pdev)
}
rtc->irq_timer = platform_get_irq(pdev, 0);
- if (rtc->irq_timer <
=
0)
- return
-ENOENT
;
+ if (rtc->irq_timer < 0)
+ return
rtc->irq_timer
;
rtc->irq_alarm = platform_get_irq(pdev, 1);
- if (rtc->irq_alarm <
=
0)
- return
-ENOENT
;
+ if (rtc->irq_alarm < 0)
+ return
rtc->irq_alarm
;
rtc->clk = devm_clk_get(&pdev->dev, "ext-clk");
if (!IS_ERR(rtc->clk))