提交 10a7c028 编写于 作者: J Johannes Berg 提交者: Emmanuel Grumbach

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: NHaim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
上级 d42f5350
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册