* [PATCH -next] net: stmmac: fix missing unlock on error in stmmac_suspend()
@ 2021-03-27 9:33 Yang Yingliang
2021-03-29 1:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2021-03-27 9:33 UTC (permalink / raw)
To: netdev; +Cc: davem, qiangqing.zhang
Add the missing unlock before return from stmmac_suspend()
in the error handling case.
Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 170296820af0..973bdf11e59d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -5605,8 +5605,10 @@ int stmmac_suspend(struct device *dev)
/* Disable clock in case of PWM is off */
clk_disable_unprepare(priv->plat->clk_ptp_ref);
ret = pm_runtime_force_suspend(dev);
- if (ret)
+ if (ret) {
+ mutex_unlock(&priv->lock);
return ret;
+ }
}
mutex_unlock(&priv->lock);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] net: stmmac: fix missing unlock on error in stmmac_suspend()
2021-03-27 9:33 [PATCH -next] net: stmmac: fix missing unlock on error in stmmac_suspend() Yang Yingliang
@ 2021-03-29 1:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-29 1:10 UTC (permalink / raw)
To: Yang Yingliang; +Cc: netdev, davem, qiangqing.zhang
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Sat, 27 Mar 2021 17:33:22 +0800 you wrote:
> Add the missing unlock before return from stmmac_suspend()
> in the error handling case.
>
> Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>
> [...]
Here is the summary with links:
- [-next] net: stmmac: fix missing unlock on error in stmmac_suspend()
https://git.kernel.org/netdev/net-next/c/30f347ae7cc1
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-29 1:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-27 9:33 [PATCH -next] net: stmmac: fix missing unlock on error in stmmac_suspend() Yang Yingliang
2021-03-29 1:10 ` patchwork-bot+netdevbpf
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).