aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
diff options
context:
space:
mode:
authorLuca Coelho <[email protected]>2021-12-19 09:01:28 +0000
committerKalle Valo <[email protected]>2021-12-20 18:41:30 +0000
commit97c0979d0d729cded6eae0d7b22d06a2eeeca3a4 (patch)
treede795297e28e237ab27fcc770492f1c72f67f237 /drivers/net/wireless/intel/iwlwifi/mvm/ops.c
parentiwlwifi: mvm: add dbg_time_point to debugfs (diff)
downloadkernel-97c0979d0d729cded6eae0d7b22d06a2eeeca3a4.tar.gz
kernel-97c0979d0d729cded6eae0d7b22d06a2eeeca3a4.zip
iwlwifi: mvm: fix imbalanced locking in iwl_mvm_start_get_nvm()
If iwl_transt_start_hw() failed, we were returning without calling wiphy_unlock() and rtnl_unlock(), causing a locking imbalance: drivers/net/wireless/intel/iwlwifi/mvm/ops.c:686:12: warning: context imbalance in 'iwl_mvm_start_get_nvm' - wrong count at exit Fix that by adding the unlock calls. Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/ops.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/ops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index 9bd869b8a974..3941baa3eda3 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -718,6 +718,8 @@ get_nvm_from_fw:
ret = iwl_trans_start_hw(mvm->trans);
if (ret) {
mutex_unlock(&mvm->mutex);
+ wiphy_unlock(mvm->hw->wiphy);
+ rtnl_unlock();
return ret;
}