From: Johannes Berg Date: Wed, 1 Apr 2015 08:00:31 +0000 (+0200) Subject: iwlwifi: mvm: don't return uninitialized value in get_survey() X-Git-Tag: firefly_0821_release~176^2~1974^2~39^2~6^2~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=10a7c028dbf9920ba6781bf1adde1811dc50de86;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- 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, mvm->radio_stats.on_time_scan; do_div(survey->time_scan, USEC_PER_MSEC); + ret = 0; out: mutex_unlock(&mvm->mutex); return ret;