[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230727115551.2655840-1-chenjiahao16@huawei.com>
Date: Thu, 27 Jul 2023 19:55:51 +0800
From: Chen Jiahao <chenjiahao16@...wei.com>
To: <justin.chen@...adcom.com>, <florian.fainelli@...adcom.com>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <bcm-kernel-feedback-list@...adcom.com>,
<netdev@...r.kernel.org>
CC: <chenjiahao16@...wei.com>
Subject: [PATCH -next] net: bcmasp: Clean up redundant dev_err_probe()
Refering to platform_get_irq()'s definition, the return value has
already been checked, error message also been printed via
dev_err_probe() if ret < 0. Calling dev_err_probe() one more time
outside platform_get_irq() is obviously redundant.
Removing dev_err_probe() outside platform_get_irq() to clean up
above problem.
Signed-off-by: Chen Jiahao <chenjiahao16@...wei.com>
---
drivers/net/ethernet/broadcom/asp2/bcmasp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.c b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
index a9984efff6d1..eb35ced1c8ba 100644
--- a/drivers/net/ethernet/broadcom/asp2/bcmasp.c
+++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
@@ -1232,7 +1232,7 @@ static int bcmasp_probe(struct platform_device *pdev)
priv->irq = platform_get_irq(pdev, 0);
if (priv->irq <= 0)
- return dev_err_probe(dev, -EINVAL, "invalid interrupt\n");
+ return -EINVAL;
priv->clk = devm_clk_get_optional_enabled(dev, "sw_asp");
if (IS_ERR(priv->clk))
--
2.34.1
Powered by blists - more mailing lists