diff options
author | Pu Lehui <pulehui@huawei.com> | 2021-05-14 11:24:05 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-05-15 01:10:51 +0300 |
commit | 2d1c5f29d27a338b6ca98f58caf191482105c418 (patch) | |
tree | 420258dd10c3e9235ba987a5874aea6bae659e64 /drivers/net/ethernet/atheros | |
parent | 052d601725526efeb433956ef86627a5e34cf2e2 (diff) | |
download | linux-2d1c5f29d27a338b6ca98f58caf191482105c418.tar.xz |
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.c | 4 |
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 */ |