Skip to content

Commit 1af3a8e

Browse files
Joakim Zhanggregkh
authored andcommitted
net: stmmac: disable clocks in stmmac_remove_config_dt()
commit 8f26910 upstream. Platform drivers may call stmmac_probe_config_dt() to parse dt, could call stmmac_remove_config_dt() in error handing after dt parsed, so need disable clocks in stmmac_remove_config_dt(). Go through all platforms drivers which use stmmac_probe_config_dt(), none of them disable clocks manually, so it's safe to disable them in stmmac_remove_config_dt(). Fixes: commit d2ed0a7 ("net: ethernet: stmmac: fix of-node and fixed-link-phydev leaks") Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f71ca81 commit 1af3a8e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
626626
void stmmac_remove_config_dt(struct platform_device *pdev,
627627
struct plat_stmmacenet_data *plat)
628628
{
629+
clk_disable_unprepare(plat->stmmac_clk);
630+
clk_disable_unprepare(plat->pclk);
629631
of_node_put(plat->phy_node);
630632
of_node_put(plat->mdio_node);
631633
}

0 commit comments

Comments
 (0)