Commit 91cdcbbc authored by Johannes Berg's avatar Johannes Berg

wifi: mac80211: clarify vif handling in TX dequeue

The vif pointer at least looks like it can actually be NULL
in some cases such as the monitor-mode vif, causing static
checkers to complain with the immediate derefence. In these
cases the sta pointer will also be NULL, but clarify it in
the code anyway.

Link: https://msgid.link/20240131164910.60066625a239.Idfb6a5a9876f9f631eae760055e1c4018259a971@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 55167a3e
...@@ -3953,7 +3953,8 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw, ...@@ -3953,7 +3953,8 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
ieee80211_free_txskb(&local->hw, skb); ieee80211_free_txskb(&local->hw, skb);
goto begin; goto begin;
} else { } else {
vif = NULL; info->control.vif = NULL;
return skb;
} }
break; break;
case NL80211_IFTYPE_AP_VLAN: case NL80211_IFTYPE_AP_VLAN:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment