From patchwork Fri Sep 1 07:13:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13372126 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 369D8CA0FE6 for ; Fri, 1 Sep 2023 07:14:21 +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=Cwq6TBHaUDUXvbf7PFzeKMzmJnpmHtxR4JMBg/QZHLQ=; b=WJ+lQJaiGmjxCR +YlVaNtQddi3CaFRoqtfp73c0/hgWBGaOXd+PPa32uvCWJv85rhYFoPPT5+3CcvBt7nam8F8fZzx3 bX28kNqn5RtF78h4sIs3V47WYc9JjKjphYgsg1GlCon56RcfKyoMNX1AnFkSNbIzEDu62cFgs6zcR 2ApLnrxAAEYNgJzJV93+y8AmYaSzEHdx9uKSUA5+g4Zf1ZtI8mWT6ZD5jeDy3u5ukGn1bXEfFuBN3 HAZNZrTakG1T1QWLSPON5u7ZpQT4cDuIeJVCQeQ0dXyrfVRxk6RMFR8XztC2V/JK1bwDG7HhtTRoO W3aomxLJLwU09dJUTQCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qbyLq-00Gakm-0E; Fri, 01 Sep 2023 07:13:54 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qbyLd-00Gak7-1C for linux-arm-kernel@lists.infradead.org; Fri, 01 Sep 2023 07:13:51 +0000 Received: from kwepemi500008.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RcTgQ5b68zNmvv; Fri, 1 Sep 2023 15:09:54 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemi500008.china.huawei.com (7.221.188.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 1 Sep 2023 15:13:32 +0800 From: Jinjie Ruan To: , , Daniel Lezcano , Thomas Gleixner , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Mans Rullgard , Maxime Ripard CC: Subject: [PATCH -next] clocksource/drivers/sun5i: Remove redundant dev_err() for platform_get_irq() Date: Fri, 1 Sep 2023 15:13:28 +0800 Message-ID: <20230901071328.1322235-1-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500008.china.huawei.com (7.221.188.139) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230901_001341_577587_414F3654 X-CRM114-Status: GOOD ( 12.33 ) 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 Since commit 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") and commit 2043727c2882 ("driver core: platform: Make use of the helper function dev_err_probe()"), there is no need to call the dev_err() function directly to print a custom message when handling an error from platform_get_irq() function as it is going to display an appropriate error message in case of a failure. Fixes: 7e5bac610d2f ("clocksource/drivers/sun5i: Convert to platform device driver") Signed-off-by: Jinjie Ruan --- 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)) {