Commit f21d1278 authored by Wen-chien Jesse Sung's avatar Wen-chien Jesse Sung Committed by Kleber Sacilotto de Souza

UBUNTU: SAUCE: net/wireless: do not dereference invalid pointer

BugLink: https://launchpad.net/bugs/1712746

The wiphy may be NULL sometimes. Do not dereference when it's NULL.
Signed-off-by: default avatarWen-chien Jesse Sung <jesse.sung@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-By: default avatarAceLan Kao <acelan.kao@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent e9eab63d
...@@ -121,7 +121,7 @@ struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy, ...@@ -121,7 +121,7 @@ struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy,
int i; int i;
for (band = 0; band < IEEE80211_NUM_BANDS; band++) { for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
sband = wiphy->bands[band]; sband = wiphy ? wiphy->bands[band] : NULL;
if (!sband) if (!sband)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment