* [PATCH] net: stmmac: dwmac-rk: fix error handling in rk_gmac_powerup()
@ 2019-01-26 19:48 Alexey Khoroshilov
2019-01-28 7:04 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Khoroshilov @ 2019-01-26 19:48 UTC (permalink / raw)
To: David Wu
Cc: ldv-project, netdev, linux-kernel, Jose Abreu, Alexey Khoroshilov,
Giuseppe Cavallaro, David S. Miller, linux-arm-kernel
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>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 7b923362ee55..3b174eae77c1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1342,8 +1342,10 @@ static int rk_gmac_powerup(struct rk_priv_data *bsp_priv)
}
ret = phy_power_on(bsp_priv, true);
- if (ret)
+ if (ret) {
+ gmac_clk_enable(bsp_priv, false);
return ret;
+ }
pm_runtime_enable(dev);
pm_runtime_get_sync(dev);
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: stmmac: dwmac-rk: fix error handling in rk_gmac_powerup()
2019-01-26 19:48 [PATCH] net: stmmac: dwmac-rk: fix error handling in rk_gmac_powerup() Alexey Khoroshilov
@ 2019-01-28 7:04 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-01-28 7:04 UTC (permalink / raw)
To: khoroshilov
Cc: ldv-project, netdev, linux-kernel, joabreu, david.wu,
peppe.cavallaro, linux-arm-kernel
From: Alexey Khoroshilov <khoroshilov@ispras.ru>
Date: Sat, 26 Jan 2019 22:48:57 +0300
> 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>
Applied, thank you.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-28 7:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-26 19:48 [PATCH] net: stmmac: dwmac-rk: fix error handling in rk_gmac_powerup() Alexey Khoroshilov
2019-01-28 7:04 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).