From: Johannes Berg Date: Wed, 31 Jan 2024 15:49:11 +0000 (+0100) Subject: wifi: mac80211: clarify vif handling in TX dequeue X-Git-Tag: microblaze-v6.10~161^2~210^2~117 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=91cdcbbcde1092da5225cfb05c88961658a34353;p=linux-2.6-microblaze.git 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@changeid Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index f57f7963ca37..098b32947c2b 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3953,7 +3953,8 @@ begin: ieee80211_free_txskb(&local->hw, skb); goto begin; } else { - vif = NULL; + info->control.vif = NULL; + return skb; } break; case NL80211_IFTYPE_AP_VLAN: