mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
UPSTREAM: net: ethernet: stmmac: dwmac-rk: fix probe error path
Make sure to disable runtime PM, power down the PHY, and disable clocks before returning on late probe errors. Fixes:27ffefd2d1("stmmac: dwmac-rk: create a new probe function") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit2d222656db) Signed-off-by: David Wu <david.wu@rock-chips.com> Change-Id: Id44143a0a92fc4d6ccb61293f44cf8dd1a3cd7a4
This commit is contained in:
@@ -1118,7 +1118,16 @@ static int rk_gmac_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
|
||||
ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
|
||||
if (ret)
|
||||
goto err_gmac_powerdown;
|
||||
|
||||
return 0;
|
||||
|
||||
err_gmac_powerdown:
|
||||
rk_gmac_powerdown(plat_dat->bsp_priv);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int rk_gmac_remove(struct platform_device *pdev)
|
||||
|
||||
Reference in New Issue
Block a user