mt76: fix potential null pointer deref in mt76_sta_add

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2018-11-17 18:22:33 +01:00
parent fa7335bbe3
commit 84aa12a4e1
+3
View File
@@ -648,6 +648,9 @@ mt76_sta_add(struct mt76_dev *dev, struct ieee80211_vif *vif,
for (i = 0; i < ARRAY_SIZE(sta->txq); i++) {
struct mt76_txq *mtxq;
if (!sta->txq[i])
continue;
mtxq = (struct mt76_txq *)sta->txq[i]->drv_priv;
mtxq->wcid = wcid;