Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: initialize return flags in HE 6 GHz operation parsing

Dan points out that if ieee80211_chandef_he_6ghz_oper() succeeds,
we don't initialize 'ret'. Initialize it to 0 in this case, since
everything went fine and nothing has to be disabled.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 57fa5e85d53c ("mac80211: determine chandef from HE 6 GHz operation")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://lore.kernel.org/r/20200603111500.bd2a5ff37b83.I2c3f338ce343b581db493eb9a0d988d1b626c8fb@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+2
+2
net/mac80211/mlme.c
··· 167 167 ret = IEEE80211_STA_DISABLE_HT | 168 168 IEEE80211_STA_DISABLE_VHT | 169 169 IEEE80211_STA_DISABLE_HE; 170 + else 171 + ret = 0; 170 172 vht_chandef = *chandef; 171 173 goto out; 172 174 }