From 944ed452eb1b4241c8bd693b8b689fe8b888c445 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Sun, 5 Apr 2020 17:30:15 +0200 Subject: rtc: remove unnecessary error message after platform_get_irq MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/04116352-b464-041c-1939-96440133aa6f@web.de Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-mt2712.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/rtc/rtc-mt2712.c') diff --git a/drivers/rtc/rtc-mt2712.c b/drivers/rtc/rtc-mt2712.c index 581b8731fb8a..f6bdbabd7202 100644 --- a/drivers/rtc/rtc-mt2712.c +++ b/drivers/rtc/rtc-mt2712.c @@ -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); -- cgit