Message ID | 20210514082405.91011-1-pulehui@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 2d1c5f29d27a338b6ca98f58caf191482105c418 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] alx: fix missing unlock on error in alx_set_pauseparam() | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 6 of 6 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 11 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Fri, 14 May 2021 16:24:05 +0800 you wrote: > 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> > --- > drivers/net/ethernet/atheros/alx/ethtool.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Here is the summary with links: - [net-next] alx: fix missing unlock on error in alx_set_pauseparam() https://git.kernel.org/netdev/net-next/c/2d1c5f29d27a You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
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 */
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> --- drivers/net/ethernet/atheros/alx/ethtool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)