diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-03-18 08:53:18 -0400 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-03-18 15:15:40 -0400 |
commit | f718c2df22b0059a0856b16562dea1b9ed28b23f (patch) | |
tree | 9e00b424ad842e3ed8d7d6d39e35e8a5083b03a4 | |
parent | 50df8a3065404b9b953b1ae1455dd991e04a9ab7 (diff) |
iwlwifi: mvm: fix theoretical NULL ptr dereference
mvmsta could have been NULL / ERR.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c b/drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c index f64e972191eb..9b59e1d7ae71 100644 --- a/drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c +++ b/drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c | |||
@@ -312,6 +312,11 @@ static ssize_t iwl_dbgfs_reduced_txp_write(struct ieee80211_vif *vif, | |||
312 | mutex_lock(&mvm->mutex); | 312 | mutex_lock(&mvm->mutex); |
313 | 313 | ||
314 | mvmsta = iwl_mvm_sta_from_staid_protected(mvm, mvmvif->ap_sta_id); | 314 | mvmsta = iwl_mvm_sta_from_staid_protected(mvm, mvmvif->ap_sta_id); |
315 | if (IS_ERR_OR_NULL(mvmsta)) { | ||
316 | mutex_unlock(&mvm->mutex); | ||
317 | return -ENOTCONN; | ||
318 | } | ||
319 | |||
315 | mvmsta->bt_reduced_txpower_dbg = false; | 320 | mvmsta->bt_reduced_txpower_dbg = false; |
316 | ret = iwl_mvm_bt_coex_reduced_txp(mvm, mvmvif->ap_sta_id, | 321 | ret = iwl_mvm_bt_coex_reduced_txp(mvm, mvmvif->ap_sta_id, |
317 | reduced_tx_power); | 322 | reduced_tx_power); |