From patchwork Fri Sep 1 07:11:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13372125 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 81195CA0FE1 for ; Fri, 1 Sep 2023 07:11:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232970AbjIAHLX (ORCPT ); Fri, 1 Sep 2023 03:11:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231418AbjIAHLX (ORCPT ); Fri, 1 Sep 2023 03:11:23 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68299E49 for ; Fri, 1 Sep 2023 00:11:20 -0700 (PDT) Received: from kwepemi500008.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RcTg50rn6zrSNv; Fri, 1 Sep 2023 15:09:37 +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:11:18 +0800 From: Jinjie Ruan To: , Vinod Koul , Frank Li CC: Subject: [PATCH -next] dmaengine: fsl-edma: Remove redundant dev_err() for platform_get_irq() Date: Fri, 1 Sep 2023 15:11:14 +0800 Message-ID: <20230901071115.1322000-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: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500008.china.huawei.com (7.221.188.139) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.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: 72f5801a4e2b ("dmaengine: fsl-edma: integrate v3 support") Signed-off-by: Jinjie Ruan --- drivers/dma/fsl-edma-main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 63d48d046f04..d493dddd55b1 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -230,10 +230,8 @@ static int fsl_edma3_irq_init(struct platform_device *pdev, struct fsl_edma_engi /* request channel irq */ fsl_chan->txirq = platform_get_irq(pdev, i); - if (fsl_chan->txirq < 0) { - dev_err(&pdev->dev, "Can't get chan %d's irq.\n", i); + if (fsl_chan->txirq < 0) return -EINVAL; - } ret = devm_request_irq(&pdev->dev, fsl_chan->txirq, fsl_edma3_tx_handler, IRQF_SHARED,