Commit 2d1c5f29 authored by Pu Lehui's avatar Pu Lehui Committed by David S. Miller
Browse files

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: 4a5fe57e ("alx: use fine-grained locking instead of RTNL")
Signed-off-by: default avatarPu Lehui <pulehui@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 052d6017
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -253,9 +253,11 @@ 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 */
	if ((fc ^ hw->flowctrl) & (ALX_FC_RX | ALX_FC_TX))