net: stmmac: dwmac-rk: fix error handling in rk_gmac_powerup()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Sat, 26 Jan 2019 19:48:57 +0000 (22:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Mar 2019 21:04:04 +0000 (14:04 -0700)
commit6b49b1b23e0d6819f6b14ac0b171a62bb02aab89
tree2f57a80713f2363e2c1eb68ee0ad0514abb54c89
parent8ed0b52225d05b3acc70efaa87408d5891a5ac89
net: stmmac: dwmac-rk: fix error handling in rk_gmac_powerup()

[ Upstream commit c69c29a1a0a8f68cd87e98ba4a5a79fb8ef2a58c ]

If phy_power_on() fails in rk_gmac_powerup(), clocks are left enabled.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c