Skip to content

Commit

Permalink
mac80211: remove unnecessary NULL check in ieee80211_register_hw()
Browse files Browse the repository at this point in the history
[ Upstream commit 4a11174 ]

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: bac2fd3 ("mac80211: remove use of ieee80211_get_he_sta_cap()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YNmgHi7Rh3SISdog@mwanda
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Dan Carpenter authored and gregkh committed Sep 15, 2021
1 parent a23f057 commit f32c136
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/main.c
Expand Up @@ -1020,7 +1020,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 */
Expand Down

0 comments on commit f32c136

Please sign in to comment.