Skip to contentSkip to conversation

mt76: mt7921: remove redundant check on type

PATCH New Colin King 1 participant 1 message Mar 12, 2021

Subsystems (5)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 mt76: mt7921: remove redundant check on type

From: Colin Ian King <[email protected]>

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")
---
 drivers/net/wireless/mediatek/mt76/mt7921/main.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7921/main.c +0 -3
index 729f6c42cdde..c8975f372cf2 100644
@@ -224,9 +224,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);
Signature · 7 lines
2.30.2


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek