diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-04-19 11:26:02 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-04-20 07:27:21 +0300 |
commit | 97b00d877bb8c2e499b9d0c07b65bd92b4e91ddd (patch) | |
tree | 59b8bd046309181b701da42092fcf98ffd95ec0c /drivers/net/wireless/intel | |
parent | 9b1ea16763d37080892e4425831ca9c6298f4f5c (diff) | |
download | linux-97b00d877bb8c2e499b9d0c07b65bd92b4e91ddd.tar.xz |
iwlwifi: pcie: fix mutex leak in gen2 start
If the context info fails to be allocated, the mutex
isn't unlocked properly, fix that.
Fixes: eda50cde58de ("iwlwifi: pcie: add context information support")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c index ef8f563a48d9..ac60a282d6de 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c @@ -359,8 +359,9 @@ int iwl_trans_pcie_gen2_start_fw(struct iwl_trans *trans, goto out; } - if (iwl_pcie_ctxt_info_init(trans, fw)) - return -ENOMEM; + ret = iwl_pcie_ctxt_info_init(trans, fw); + if (ret) + goto out; /* re-check RF-Kill state since we may have missed the interrupt */ hw_rfkill = iwl_trans_check_hw_rf_kill(trans); |