summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/atheros
diff options
context:
space:
mode:
authorPu Lehui <pulehui@huawei.com>2021-05-14 16:24:05 +0800
committerDavid S. Miller <davem@davemloft.net>2021-05-14 15:10:51 -0700
commit2d1c5f29d27a338b6ca98f58caf191482105c418 (patch)
tree420258dd10c3e9235ba987a5874aea6bae659e64 /drivers/net/ethernet/atheros
parent052d601725526efeb433956ef86627a5e34cf2e2 (diff)
downloadlinux-stable-2d1c5f29d27a338b6ca98f58caf191482105c418.tar.gz
linux-stable-2d1c5f29d27a338b6ca98f58caf191482105c418.tar.bz2
linux-stable-2d1c5f29d27a338b6ca98f58caf191482105c418.zip
alx: fix missing unlock on error in alx_set_pauseparam()
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/atheros')
-rw-r--r--drivers/net/ethernet/atheros/alx/ethtool.c4
1 files changed, 3 insertions, 1 deletions
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 */