mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 13:30:45 -05:00
wifi: iwlwifi: pcie: fix locking on invalid TOP reset
If a TOP reset were to ever be erroneously requested on HW
prior to SC, the code warns and returns, but doesn't take
care to unlock the mutex in this case. Fix that.
Fixes: 909e1be654 ("wifi: iwlwifi: implement TOP reset")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202506100707.WAnP5ePA-lkp@intel.com/
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250625204210.19a0378838b1.I6bdc58d4996e995e1358ad94d4cc5017f3abf47b@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
This commit is contained in:
committed by
Miri Korenblit
parent
93598167dc
commit
e5d110fec0
@@ -546,8 +546,10 @@ int iwl_trans_pcie_gen2_start_fw(struct iwl_trans *trans,
|
||||
}
|
||||
|
||||
if (WARN_ON(trans->do_top_reset &&
|
||||
trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_SC))
|
||||
return -EINVAL;
|
||||
trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_SC)) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* we need to wait later - set state */
|
||||
if (trans->do_top_reset)
|
||||
|
||||
Reference in New Issue
Block a user