aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-04-01 04:00:31 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-04-02 02:29:12 -0400
commit10a7c028dbf9920ba6781bf1adde1811dc50de86 (patch)
tree3ddf98364f046a7e74ea167f21c0ceffa1757a1e
parentd42f53503406d5dcedbad9ea18c964f189f72d84 (diff)
iwlwifi: mvm: don't return uninitialized value in get_survey()
If ucode_loaded isn't true the function returns the 'ret' variable without having assigned a value properly. Fix that. Reported-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index fc73cc1bda0d..74912e7fd3b2 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -3911,6 +3911,7 @@ static int iwl_mvm_mac_get_survey(struct ieee80211_hw *hw, int idx,
3911 mvm->radio_stats.on_time_scan; 3911 mvm->radio_stats.on_time_scan;
3912 do_div(survey->time_scan, USEC_PER_MSEC); 3912 do_div(survey->time_scan, USEC_PER_MSEC);
3913 3913
3914 ret = 0;
3914 out: 3915 out:
3915 mutex_unlock(&mvm->mutex); 3916 mutex_unlock(&mvm->mutex);
3916 return ret; 3917 return ret;