[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1411458058-18934-5-git-send-email-b38611@freescale.com>
Date: Tue, 23 Sep 2014 15:40:58 +0800
From: Fugang Duan <b38611@...escale.com>
To: <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, <b20596@...escale.com>,
<b38611@...escale.com>
Subject: [PATCH v1 4/4] 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@...escale.com>
---
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 3ce3567..2b16ead 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;
}
--
1.7.8
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists