rtc: remove unnecessary error message after platform_get_irq
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 5 Apr 2020 15:30:15 +0000 (17:30 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 15 Apr 2020 07:56:17 +0000 (09:56 +0200)
The function “platform_get_irq” can log an error already.
Thus omit redundant messages for the exception handling in the
calling functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Link: https://lore.kernel.org/r/04116352-b464-041c-1939-96440133aa6f@web.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-fsl-ftm-alarm.c
drivers/rtc/rtc-lpc24xx.c
drivers/rtc/rtc-mt2712.c

index 756af62b0486c94025d370e390a7b94fab03844d..23c811da48014969bd91a05621ddcd76f235beaa 100644 (file)
@@ -268,10 +268,8 @@ static int ftm_rtc_probe(struct platform_device *pdev)
        }
 
        irq = platform_get_irq(pdev, 0);
-       if (irq < 0) {
-               dev_err(&pdev->dev, "can't get irq number\n");
+       if (irq < 0)
                return irq;
-       }
 
        ret = devm_request_irq(&pdev->dev, irq, ftm_rtc_alarm_interrupt,
                               IRQF_NO_SUSPEND, dev_name(&pdev->dev), rtc);
index 00ef16ba94809f789bf74837829da2fb1b557704..eec881a81067886d85d6114b3e555adaec4776f6 100644 (file)
@@ -205,10 +205,8 @@ static int lpc24xx_rtc_probe(struct platform_device *pdev)
                return PTR_ERR(rtc->rtc_base);
 
        irq = platform_get_irq(pdev, 0);
-       if (irq < 0) {
-               dev_warn(&pdev->dev, "can't get interrupt resource\n");
+       if (irq < 0)
                return irq;
-       }
 
        rtc->clk_rtc = devm_clk_get(&pdev->dev, "rtc");
        if (IS_ERR(rtc->clk_rtc)) {
index 581b8731fb8a69ed7b52de3afe21ffafb277a67c..f6bdbabd72023940cc65def22f81251f611a079e 100644 (file)
@@ -328,10 +328,8 @@ static int mt2712_rtc_probe(struct platform_device *pdev)
        mt2712_rtc_hw_init(mt2712_rtc);
 
        mt2712_rtc->irq = platform_get_irq(pdev, 0);
-       if (mt2712_rtc->irq < 0) {
-               dev_err(&pdev->dev, "No IRQ resource\n");
+       if (mt2712_rtc->irq < 0)
                return mt2712_rtc->irq;
-       }
 
        platform_set_drvdata(pdev, mt2712_rtc);