]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: initialize variable have_higher_than_11mbit
authorTom Rix <trix@redhat.com>
Thu, 23 Dec 2021 16:28:48 +0000 (08:28 -0800)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 4 Jan 2022 14:02:52 +0000 (15:02 +0100)
commitcfb80dde657ce196f5151f7f1b7b03a28cf4fc2e
treeddeb1c9618b9ecdca7842ee71004abc81567722a
parent6768755684214e99684ab29facfd1c0d03cf99ec
mac80211: initialize variable have_higher_than_11mbit

Clang static analysis reports this warnings

mlme.c:5332:7: warning: Branch condition evaluates to a
  garbage value
    have_higher_than_11mbit)
    ^~~~~~~~~~~~~~~~~~~~~~~

have_higher_than_11mbit is only set to true some of the time in
ieee80211_get_rates() but is checked all of the time.  So
have_higher_than_11mbit needs to be initialized to false.

Fixes: a5ec26c7e553 ("mac80211: set basic rates earlier")
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20211223162848.3243702-1-trix@redhat.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c