Skip to content

Commit 8f26910

Browse files
Joakim Zhangdavem330
authored andcommitted
net: stmmac: disable clocks in stmmac_remove_config_dt()
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a4f0377 commit 8f26910

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)
622622
void stmmac_remove_config_dt(struct platform_device *pdev,
623623
struct plat_stmmacenet_data *plat)
624624
{
625+
clk_disable_unprepare(plat->stmmac_clk);
626+
clk_disable_unprepare(plat->pclk);
625627
of_node_put(plat->phy_node);
626628
of_node_put(plat->mdio_node);
627629
}

0 commit comments

Comments
 (0)