]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: stmmac: dwmac-rk: fix error path in rk_gmac_probe
authorEmil Renner Berthing <kernel@esmil.dk>
Sat, 21 Mar 2020 14:36:19 +0000 (15:36 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Mar 2020 02:58:48 +0000 (19:58 -0700)
Make sure we clean up devicetree related configuration
also when clock init fails.

Fixes: e3907808f15d ("net: stmmac: dwmac-rk: Add integrated PHY support")
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c

index dc50ba13a7468e5ec42ffcc2456e0fcdb4410432..2d5573b3dee1466c8793b2a7632cd8ca14c9de30 100644 (file)
@@ -1411,7 +1411,7 @@ static int rk_gmac_probe(struct platform_device *pdev)
 
        ret = rk_gmac_clk_init(plat_dat);
        if (ret)
-               return ret;
+               goto err_remove_config_dt;
 
        ret = rk_gmac_powerup(plat_dat->bsp_priv);
        if (ret)