提交 2d1c5f29 编写于 作者: P Pu Lehui 提交者: David S. Miller

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: NPu Lehui <pulehui@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 052d6017
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册