]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 15 Jul 2021 17:27:47 +0000 (19:27 +0200)
commitef5ffa8d55bde4d155cdfaec87a4e59cafe7943d
treed0d82e77ad1d25d25d95f295a0096be15d179dc3
parent89c2f0e3678b4dab1760946c125bd52aa4621bc1
net: stmmac: disable clocks in stmmac_remove_config_dt()

BugLink: https://bugs.launchpad.net/bugs/1934179
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c