mac80211: remove unnecessary NULL check in ieee80211_register_hw()
Subsystems (2)
PATCH 1/1 mac80211: remove unnecessary NULL check in ieee80211_register_hw()
The address "&sband->iftype_data[i]" points to an array at the end of struct. It can't be NULL and so the check can be removed.
Fixes bac2fd3d7534 ("mac80211: remove use of ieee80211_get_he_sta_cap()")
Signed-off-by Dan Carpenter <[email protected]>
---
This patch doesn't really *fix* anything of course. I just added the Fixes tag to help reviewers.
net/mac80211/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/mac80211/main.c +1 -1
@@ -1018,7 +1018,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) iftd = &sband->iftype_data[i]; - supp_he = supp_he || (iftd && iftd->he_cap.has_he); + supp_he = supp_he || iftd->he_cap.has_he; }/* HT, VHT, HE require QoS, thus >= 4 queues */
Signature · 1 line
2.30.2