Skip to content

Commit 4d349a5

Browse files
Ruan Jinjiealexandrebelloni
authored andcommitted
rtc: omap: Do not check for 0 return after calling platform_get_irq()
It is not possible for platform_get_irq() to return 0. Use the return value from platform_get_irq(). Signed-off-by: Ruan Jinjie <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 0197a7c commit 4d349a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/rtc/rtc-omap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -747,12 +747,12 @@ static int omap_rtc_probe(struct platform_device *pdev)
747747
}
748748

749749
rtc->irq_timer = platform_get_irq(pdev, 0);
750-
if (rtc->irq_timer <= 0)
751-
return -ENOENT;
750+
if (rtc->irq_timer < 0)
751+
return rtc->irq_timer;
752752

753753
rtc->irq_alarm = platform_get_irq(pdev, 1);
754-
if (rtc->irq_alarm <= 0)
755-
return -ENOENT;
754+
if (rtc->irq_alarm < 0)
755+
return rtc->irq_alarm;
756756

757757
rtc->clk = devm_clk_get(&pdev->dev, "ext-clk");
758758
if (!IS_ERR(rtc->clk))

0 commit comments

Comments
 (0)