From patchwork Thu Aug 31 04:14:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 13370897 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F298DC83F29 for ; Thu, 31 Aug 2023 04:14:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=KBmBpadWHo1pYXXunzWI81/nr0DeHKIfEG5bKq8qAx0=; b=UctoCOwuz11Sfj Xj9JKsc9KTvVm8CrVtknGnKKZhOnHU8FdIMLnuUD2iADmUsmgsaBL9NS4RLLyT35+nplaLpxoqQb/ v7DBda9rG2NjMd7dWvlx3o1SU9t4XqkaNEssRCmiA/v/VkrtU6KGBhp9WtqxhytLU0gdJBfhkfe3b uY8rJQCHR8TsUDitEc0doFcypLH6vkycGSjriYLIJTnNhYRn/q6onNh8YfOhBM2GFl5clm/8obcAf IXycPdUv5SPFdAOvpL54BypFLkCbg+PMUSSdZddOsF2Wc4XKyd8UBo7ARmiHHwYp/8+a6FzWXYUv8 s8aOVmW6oszes81Kj0kw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qbZ4d-00EcEh-0w; Thu, 31 Aug 2023 04:14:27 +0000 Received: from out30-111.freemail.mail.aliyun.com ([115.124.30.111]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qbZ4Z-00EcDg-0E for linux-arm-kernel@lists.infradead.org; Thu, 31 Aug 2023 04:14:25 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230830_211423_303624_50D27CB9 X-CRM114-Status: GOOD ( 10.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 *pdev) } irq = platform_get_irq(pdev, 0); - if (irq < 0) { - dev_err(dev, "Can't get IRQ\n"); + if (irq < 0) return irq; - } clk = devm_clk_get_enabled(dev, NULL); if (IS_ERR(clk)) {