wifi: mac80211: Drop not needed check for NULL
authorAlexander Wetzel <alexander@wetzel-home.de>
Mon, 7 Nov 2022 16:13:28 +0000 (17:13 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 1 Dec 2022 14:09:10 +0000 (15:09 +0100)
ieee80211_get_txq() can only be called with vif != NULL.
Remove not needed NULL test in function.

Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/20221107161328.2883-1-alexander@wetzel-home.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/tx.c

index 165ac0711d71c083e7369fd0d0f54bb52f36caa8..3ed5ca4a2baee407438912cb6e3aacfc42e05186 100644 (file)
@@ -1343,7 +1343,7 @@ static struct txq_info *ieee80211_get_txq(struct ieee80211_local *local,
                        return NULL;
 
                txq = sta->sta.txq[tid];
-       } else if (vif) {
+       } else {
                txq = vif->txq;
        }