Skip to content

Commit 661710b

Browse files
Zhang Changzhongkuba-moo
authored andcommitted
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: 9efc9b2 ("net: stmmac: Add dwmac-intel-plat for GBE driver") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> Link: https://lore.kernel.org/r/1605249243-17262-1-git-send-email-zhangchangzhong@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 3beb9be commit 661710b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
113113
/* Enable TX clock */
114114
if (dwmac->data->tx_clk_en) {
115115
dwmac->tx_clk = devm_clk_get(&pdev->dev, "tx_clk");
116-
if (IS_ERR(dwmac->tx_clk))
116+
if (IS_ERR(dwmac->tx_clk)) {
117+
ret = PTR_ERR(dwmac->tx_clk);
117118
goto err_remove_config_dt;
119+
}
118120

119121
clk_prepare_enable(dwmac->tx_clk);
120122

0 commit comments

Comments
 (0)