1 diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
2 index 41a31f2..c062438 100644
3 --- a/drivers/net/ethernet/freescale/fec_main.c
4 +++ b/drivers/net/ethernet/freescale/fec_main.c
5 @@ -1875,6 +1875,8 @@ static int fec_enet_mdio_write(struct mii_bus *bus, int mii_id, int regnum,
9 +static int fec_reset_phy(struct platform_device *pdev);
11 static int fec_enet_clk_enable(struct net_device *ndev, bool enable)
13 struct fec_enet_private *fep = netdev_priv(ndev);
14 @@ -1885,6 +1887,7 @@ static int fec_enet_clk_enable(struct net_device *ndev, bool enable)
15 ret = clk_prepare_enable(fep->clk_enet_out);
18 + fec_reset_phy(fep->pdev);
21 mutex_lock(&fep->ptp_clk_mutex);
22 @@ -3367,6 +3370,8 @@ static int fec_reset_phy(struct platform_device *pdev)
24 gpio_set_value_cansleep(phy_reset, !active_high);
26 + devm_gpio_free(&pdev->dev, phy_reset);