Commit e3c9614f authored by Nimrod Andy's avatar Nimrod Andy Committed by David S. Miller

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: default avatarFugang Duan <B38611@freescale.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b64bf4b7
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment