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

UBUNTU: SAUCE: mwifiex: do not dereference invalid pointer

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

Check priv->wdev.wiphy before dereference.
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 f21d1278
...@@ -324,7 +324,9 @@ mwifiex_get_cfp(struct mwifiex_private *priv, u8 band, u16 channel, u32 freq) ...@@ -324,7 +324,9 @@ mwifiex_get_cfp(struct mwifiex_private *priv, u8 band, u16 channel, u32 freq)
if (mwifiex_band_to_radio_type(band) == HostCmd_SCAN_RADIO_TYPE_BG) if (mwifiex_band_to_radio_type(band) == HostCmd_SCAN_RADIO_TYPE_BG)
sband = priv->wdev.wiphy->bands[IEEE80211_BAND_2GHZ]; sband = priv->wdev.wiphy->bands[IEEE80211_BAND_2GHZ];
else else
sband = priv->wdev.wiphy->bands[IEEE80211_BAND_5GHZ]; sband = priv->wdev.wiphy ?
priv->wdev.wiphy->bands[IEEE80211_BAND_5GHZ] :
NULL;
if (!sband) { if (!sband) {
mwifiex_dbg(priv->adapter, ERROR, mwifiex_dbg(priv->adapter, ERROR,
......
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