diff options
author | Nimrod Andy <B38611@freescale.com> | 2014-09-23 15:40:58 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-26 16:05:21 -0400 |
commit | e3c9614f3a5869e93c78b1630ab72572aa4cd2a3 (patch) | |
tree | 1314ac934659901a1665d3526b661c0c503c7891 /drivers/net/ethernet/freescale | |
parent | b64bf4b7dded4febb8e1f319eb6b9d419cbbd856 (diff) | |
download | op-kernel-dev-e3c9614f3a5869e93c78b1630ab72572aa4cd2a3.zip op-kernel-dev-e3c9614f3a5869e93c78b1630ab72572aa4cd2a3.tar.gz |
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 <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 3d12a84..2c73434 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; } |