Skip to content

Commit

Permalink
iwlwifi: pcie: gen2: fix locking when "HW not ready"
Browse files Browse the repository at this point in the history
commit 4c29c1e upstream.

If we run into this error path, we shouldn't unlock the mutex
since it's not locked since. Fix this in the gen2 code as well.

Fixes: eda50cd ("iwlwifi: pcie: add context information support")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/iwlwifi.20220128142706.b8b0dfce16ef.Ie20f0f7b23e5911350a2766524300d2915e7b677@changeid
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
jmberg-intel authored and gregkh committed Feb 23, 2022
1 parent 8867f99 commit b26ea3f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
Expand Up @@ -320,8 +320,7 @@ int iwl_trans_pcie_gen2_start_fw(struct iwl_trans *trans,
/* This may fail if AMT took ownership of the device */
if (iwl_pcie_prepare_card_hw(trans)) {
IWL_WARN(trans, "Exit HW not ready\n");
ret = -EIO;
goto out;
return -EIO;
}

iwl_enable_rfkill_int(trans);
Expand Down

0 comments on commit b26ea3f

Please sign in to comment.