From: Pu Lehui Date: Fri, 14 May 2021 08:24:05 +0000 (+0800) Subject: alx: fix missing unlock on error in alx_set_pauseparam() X-Git-Tag: accepted/tizen/unified/20230118.172025~6942^2~535 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d1c5f29d27a338b6ca98f58caf191482105c418;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/atheros/alx/ethtool.c b/drivers/net/ethernet/atheros/alx/ethtool.c index f362715..b716ada 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 */