Skip to content

Commit e5d110f

Browse files
jmberg-intelMiriam-Rachel
authored andcommitted
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: 909e1be ("wifi: iwlwifi: implement TOP reset") Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/r/[email protected]/ Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250625204210.19a0378838b1.I6bdc58d4996e995e1358ad94d4cc5017f3abf47b@changeid Signed-off-by: Miri Korenblit <[email protected]>
1 parent 9359816 commit e5d110f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,10 @@ int iwl_trans_pcie_gen2_start_fw(struct iwl_trans *trans,
546546
}
547547

548548
if (WARN_ON(trans->do_top_reset &&
549-
trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_SC))
550-
return -EINVAL;
549+
trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_SC)) {
550+
ret = -EINVAL;
551+
goto out;
552+
}
551553

552554
/* we need to wait later - set state */
553555
if (trans->do_top_reset)

0 commit comments

Comments
 (0)