The return from ieee80211_get_sband can potentially be a null pointer, so
it seems prudent to add a null check to avoid a null pointer dereference
on sband.
Addresses-Coverity: ("Dereference null return")
Fixes: 2ab45876756f ("mac80211: add support for the ADDBA extension element")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190730143205.14261-1-colin.king@canonical.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
u8 *pos;
sband = ieee80211_get_sband(sdata);
+ if (!sband)
+ return;
he_cap = ieee80211_get_he_iftype_cap(sband, sdata->vif.type);
if (!he_cap)
return;