diff options
author | Johan Hovold <johan@kernel.org> | 2016-11-30 15:29:53 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-02 10:42:46 -0500 |
commit | 5cc70bbcacf6728b598b529a061930d8271adbb5 (patch) | |
tree | 01a774686884d89bd490fcbca20e7db943d58402 /drivers | |
parent | 939b20022765bc338b0f72cbf1eed60a907398d7 (diff) | |
download | linux-stable-5cc70bbcacf6728b598b529a061930d8271adbb5.tar.gz linux-stable-5cc70bbcacf6728b598b529a061930d8271adbb5.tar.bz2 linux-stable-5cc70bbcacf6728b598b529a061930d8271adbb5.zip |
net: ethernet: stmmac: dwmac-meson8b: fix probe error path
Make sure to disable clocks before returning on late probe errors.
Fixes: 566e82516253 ("net: stmmac: add a glue driver for the Amlogic
Meson 8b / GXBB DWMAC")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c index 250e4ceafc8d..45e7aaf0170d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c @@ -289,7 +289,16 @@ static int meson8b_dwmac_probe(struct platform_device *pdev) 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) |