net: fec: add missed clk_disable_unprepare in remove
authorChuhong Yuan <hslester96@gmail.com>
Mon, 4 Nov 2019 15:50:00 +0000 (23:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Nov 2019 19:35:21 +0000 (11:35 -0800)
This driver forgets to disable and unprepare clks when remove.
Add calls to clk_disable_unprepare to fix it.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c

index 22c01b224baa8b500863e982373f04e09168c0ac..a9c386b635811f0f65c4af79d51cef346da54b4b 100644 (file)
@@ -3645,6 +3645,8 @@ fec_drv_remove(struct platform_device *pdev)
                regulator_disable(fep->reg_phy);
        pm_runtime_put(&pdev->dev);
        pm_runtime_disable(&pdev->dev);
+       clk_disable_unprepare(fep->clk_ahb);
+       clk_disable_unprepare(fep->clk_ipg);
        if (of_phy_is_fixed_link(np))
                of_phy_deregister_fixed_link(np);
        of_node_put(fep->phy_node);