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:02:29 +0000 (14:02 -0700)
commit1f4ccda30391284201d732d0d360138efcfe01eb
tree77d5291bbfaade64f80c40a5d0049f86dc1388d1
parent4a22084f6bbc1c43910917d8162d674ae6e2f2b1
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