[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1605249243-17262-1-git-send-email-zhangchangzhong@huawei.com>
Date: Fri, 13 Nov 2020 14:34:03 +0800
From: Zhang Changzhong <zhangchangzhong@...wei.com>
To: <peppe.cavallaro@...com>, <alexandre.torgue@...com>,
<joabreu@...opsys.com>, <davem@...emloft.net>, <kuba@...nel.org>,
<mcoquelin.stm32@...il.com>, <vineetha.g.jaya.kumaran@...el.com>,
<rusaimi.amira.rusaimi@...el.com>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH net] net: stmmac: dwmac-intel-plat: fix error return code in intel_eth_plat_probe()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 9efc9b2b04c7 ("net: stmmac: Add dwmac-intel-plat for GBE driver")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@...wei.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
index f61cb99..82b1c7a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
@@ -113,8 +113,10 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
/* Enable TX clock */
if (dwmac->data->tx_clk_en) {
dwmac->tx_clk = devm_clk_get(&pdev->dev, "tx_clk");
- if (IS_ERR(dwmac->tx_clk))
+ if (IS_ERR(dwmac->tx_clk)) {
+ ret = PTR_ERR(dwmac->tx_clk);
goto err_remove_config_dt;
+ }
clk_prepare_enable(dwmac->tx_clk);
--
2.9.5
Powered by blists - more mailing lists