]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: remove the need for variable rates_idx
authorColin Ian King <colin.king@canonical.com>
Wed, 22 Jul 2020 15:38:30 +0000 (16:38 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 31 Jul 2020 07:24:22 +0000 (09:24 +0200)
commit1ee52001923c25806255307d15c636e8e53950bc
tree14abcf0589cd3b4937c5c17cf5e515a6e205d2cb
parent18b894fdd5d773a0d9b05919dac853803fa78a6a
mac80211: remove the need for variable rates_idx

Currently rates_idx is being initialized with the value -1 and this
value is never read so the initialization is redundant and can be
removed. The next time the variable is used it is assigned a value
that is returned a few statements later. Just return i - 1 and
remove the need for rates_idx.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200722153830.959010-1-colin.king@canonical.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/status.c