Commit 661710bf authored by Zhang Changzhong's avatar Zhang Changzhong Committed by Jakub Kicinski

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: 9efc9b2b ("net: stmmac: Add dwmac-intel-plat for GBE driver")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Link: https://lore.kernel.org/r/1605249243-17262-1-git-send-email-zhangchangzhong@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 3beb9be1
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment