From: Nimrod Andy Date: Tue, 23 Sep 2014 07:40:58 +0000 (+0800) Subject: net: fec: free resource after phy probe failed X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e3c9614f3a5869e93c78b1630ab72572aa4cd2a3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net: fec: free resource after phy probe failed Free memory and disable all related clocks when there has no phy connection or phy probe failed. Signed-off-by: Fugang Duan Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 3d12a841ad15..2c7343473e1c 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -2675,6 +2675,8 @@ fec_enet_open(struct net_device *ndev) ret = fec_enet_mii_probe(ndev); if (ret) { fec_enet_free_buffers(ndev); + fec_enet_clk_enable(ndev, false); + pinctrl_pm_select_sleep_state(&fep->pdev->dev); return ret; }