From nobody Thu Dec 18 18:02:53 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19397C83F29 for ; Thu, 31 Aug 2023 04:14:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244570AbjHaEO2 (ORCPT ); Thu, 31 Aug 2023 00:14:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239176AbjHaEO1 (ORCPT ); Thu, 31 Aug 2023 00:14:27 -0400 Received: from out30-118.freemail.mail.aliyun.com (out30-118.freemail.mail.aliyun.com [115.124.30.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A4ADCEA for ; Wed, 30 Aug 2023 21:14:19 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0Vqwo882_1693455255; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Vqwo882_1693455255) by smtp.aliyun-inc.com; Thu, 31 Aug 2023 12:14:16 +0800 From: Yang Li To: jernej.skrabec@gmail.com, samuel@sholland.org, wens@csie.org Cc: daniel.lezcano@linaro.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, Yang Li Subject: [PATCH -next] clocksource/drivers/sun5i: Remove surplus dev_err() when using platform_get_irq() Date: Thu, 31 Aug 2023 12:14:14 +0800 Message-Id: <20230831041414.66434-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. ./drivers/clocksource/timer-sun5i.c:260:2-9: line 260 is redundant because = platform_get_irq() already prints an error Signed-off-by: Yang Li Acked-by: Jernej Skrabec --- drivers/clocksource/timer-sun5i.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clocksource/timer-sun5i.c b/drivers/clocksource/timer-= sun5i.c index 69fee3540d37..0d229a9058da 100644 --- a/drivers/clocksource/timer-sun5i.c +++ b/drivers/clocksource/timer-sun5i.c @@ -256,10 +256,8 @@ static int sun5i_timer_probe(struct platform_device *p= dev) } =20 irq =3D platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(dev, "Can't get IRQ\n"); + if (irq < 0) return irq; - } =20 clk =3D devm_clk_get_enabled(dev, NULL); if (IS_ERR(clk)) { --=20 2.20.1.7.g153144c