]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mt76: mt7921: remove redundant check on type
authorColin Ian King <colin.king@canonical.com>
Fri, 12 Mar 2021 17:29:49 +0000 (17:29 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:59:56 +0000 (16:59 +0200)
[ Upstream commit 1921b8925c6f2a171af6294bba6af733da2409b9 ]

Currently in the switch statement case where type is
NL80211_IFTYPE_STATION there is a check to see if type
is not NL80211_IFTYPE_STATION.  This check is always false
and is redundant dead code that can be removed.

Addresses-Coverity: ("Logically dead code")
Fixes: e0f9fdda81bd ("mt76: mt7921: add ieee80211_ops")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mt7921/main.c

index c6e8857067a3aed2dc9a5e8a3e40b135b1228882..05ba9cdffb1a69700736e12de19a21a0852c6182 100644 (file)
@@ -239,9 +239,6 @@ static int get_omac_idx(enum nl80211_iftype type, u64 mask)
                if (i)
                        return i - 1;
 
-               if (type != NL80211_IFTYPE_STATION)
-                       break;
-
                /* next, try to find a free repeater entry for the sta */
                i = get_free_idx(mask >> REPEATER_BSSID_START, 0,
                                 REPEATER_BSSID_MAX - REPEATER_BSSID_START);