Skip to content

Commit

Permalink
iwlwifi: mvm: don't return uninitialized value in get_survey()
Browse files Browse the repository at this point in the history
If ucode_loaded isn't true the function returns the 'ret' variable
without having assigned a value properly. Fix that.

Reported-by: Haim Dreyfuss <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
  • Loading branch information
jmberg-intel authored and egrumbach committed Apr 2, 2015
1 parent d42f535 commit 10a7c02
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/iwlwifi/mvm/mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 10a7c02

Please sign in to comment.