提交 5cc70bbc 编写于 作者: J Johan Hovold 提交者: David S. Miller

net: ethernet: stmmac: dwmac-meson8b: fix probe error path

Make sure to disable clocks before returning on late probe errors.

Fixes: 566e8251 ("net: stmmac: add a glue driver for the Amlogic
Meson 8b / GXBB DWMAC")
Signed-off-by: NJohan Hovold <johan@kernel.org>
Acked-by: NKevin Hilman <khilman@baylibre.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 939b2002
...@@ -289,7 +289,16 @@ static int meson8b_dwmac_probe(struct platform_device *pdev) ...@@ -289,7 +289,16 @@ static int meson8b_dwmac_probe(struct platform_device *pdev)
plat_dat->bsp_priv = dwmac; plat_dat->bsp_priv = dwmac;
return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
if (ret)
goto err_clk_disable;
return 0;
err_clk_disable:
clk_disable_unprepare(dwmac->m25_div_clk);
return ret;
} }
static int meson8b_dwmac_remove(struct platform_device *pdev) static int meson8b_dwmac_remove(struct platform_device *pdev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册