diff options
author | Colin Ian King <colin.king@canonical.com> | 2020-01-11 09:08:24 +0000 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-01-26 12:48:09 +0200 |
commit | 3b4516838eaabacc56770f12407d5f791c88838a (patch) | |
tree | c2a1568a8acc7eb90f4b1cf144c31cfbb9502775 /drivers/net/wireless/ath/ath11k/dp_tx.c | |
parent | 875603b3de9fb5dc11acf80b6df45709adec68b2 (diff) |
ath11k: avoid null pointer dereference when pointer band is null
In the unlikely event that cap->supported_bands has neither
WMI_HOST_WLAN_2G_CAP set or WMI_HOST_WLAN_5G_CAP set then pointer
band is null and a null dereference occurs when assigning
band->n_iftype_data. Move the assignment to the if blocks to
avoid this. Cleans up static analysis warnings.
Addresses-Coverity: ("Explicit null dereference")
Fixes: 9f056ed8ee01 ("ath11k: add HE support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/dp_tx.c')
0 files changed, 0 insertions, 0 deletions