All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] alx: fix missing unlock on error in alx_set_pauseparam()
@ 2021-05-14  8:24 Pu Lehui
  2021-05-14 22:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Pu Lehui @ 2021-05-14  8:24 UTC (permalink / raw)
  To: chris.snook, davem, kuba, johannes; +Cc: netdev, linux-kernel, pulehui

Add the missing unlock before return from function alx_set_pauseparam()
in the error handling case.

Fixes: 4a5fe57e7751 ("alx: use fine-grained locking instead of RTNL")
Signed-off-by: Pu Lehui <pulehui@huawei.com>
---
 drivers/net/ethernet/atheros/alx/ethtool.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/atheros/alx/ethtool.c b/drivers/net/ethernet/atheros/alx/ethtool.c
index f3627157a38a..b716adacd815 100644
--- a/drivers/net/ethernet/atheros/alx/ethtool.c
+++ b/drivers/net/ethernet/atheros/alx/ethtool.c
@@ -253,8 +253,10 @@ static int alx_set_pauseparam(struct net_device *netdev,
 
 	if (reconfig_phy) {
 		err = alx_setup_speed_duplex(hw, hw->adv_cfg, fc);
-		if (err)
+		if (err) {
+			mutex_unlock(&alx->mtx);
 			return err;
+		}
 	}
 
 	/* flow control on mac */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] alx: fix missing unlock on error in alx_set_pauseparam()
  2021-05-14  8:24 [PATCH net-next] alx: fix missing unlock on error in alx_set_pauseparam() Pu Lehui
@ 2021-05-14 22:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-14 22:20 UTC (permalink / raw)
  To: Pu Lehui; +Cc: chris.snook, davem, kuba, johannes, netdev, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Fri, 14 May 2021 16:24:05 +0800 you wrote:
> Add the missing unlock before return from function alx_set_pauseparam()
> in the error handling case.
> 
> Fixes: 4a5fe57e7751 ("alx: use fine-grained locking instead of RTNL")
> Signed-off-by: Pu Lehui <pulehui@huawei.com>
> ---
>  drivers/net/ethernet/atheros/alx/ethtool.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Here is the summary with links:
  - [net-next] alx: fix missing unlock on error in alx_set_pauseparam()
    https://git.kernel.org/netdev/net-next/c/2d1c5f29d27a

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-05-14 22:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14  8:24 [PATCH net-next] alx: fix missing unlock on error in alx_set_pauseparam() Pu Lehui
2021-05-14 22:20 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.