summaryrefslogtreecommitdiffstats
path: root/net/mac80211/rc80211_minstrel_ht.c
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2021-02-04 15:44:39 +0200
committerJohannes Berg <johannes.berg@intel.com>2021-02-12 08:56:19 +0100
commit9e6d51265b0aba145ab03b30dcdf3b88902e71f0 (patch)
tree979280fe33d99bc39f9dfced4aafd728df910f3d /net/mac80211/rc80211_minstrel_ht.c
parent6194f7e6473be78acdc5d03edd116944bdbb2c4e (diff)
downloadlinux-9e6d51265b0aba145ab03b30dcdf3b88902e71f0.tar.gz
linux-9e6d51265b0aba145ab03b30dcdf3b88902e71f0.tar.bz2
linux-9e6d51265b0aba145ab03b30dcdf3b88902e71f0.zip
cfg80211: initialize reg_rule in __freq_reg_info()
Sparse started warning on this function because we can potentially return an uninitialized value. The reason is that if the caller passes a min_bw value that is higher then the last value in bws[], we will not go into the loop and reg_rule will remain initialized. This cannot happen because the only caller of this function uses either 1 or 20 in min_bw, but the function will be more robust if we pre-initialize the value. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210204154439.6c884ea7281c.I257278d03b0c1ae0aa6631672cfa48f1a95d5996@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rc80211_minstrel_ht.c')
0 files changed, 0 insertions, 0 deletions