net: stmmac: disable clocks in stmmac_remove_config_dt()
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Wed, 16 Jun 2021 09:10:24 +0000 (17:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Jun 2021 12:42:54 +0000 (14:42 +0200)
commit1af3a8e91f1accd45f69bd430f92c3a5698cdb56
tree5efd3246d41b0e720abdf12a96d3791b934b4a66
parentf71ca814c2860861750668044a18e6d7d74cc2d5
net: stmmac: disable clocks in stmmac_remove_config_dt()

commit 8f269102baf788aecfcbbc6313b6bceb54c9b990 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 d2ed0a7755fe ("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>
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c