diff options
author | Wei-Ning Huang <wnhuang@chromium.org> | 2016-03-30 18:14:55 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-04-07 19:40:29 +0300 |
commit | a5c92f0b6a88a8abe3840869425f1372591a762c (patch) | |
tree | 0ca107395245be27d041c7b96fd3a1ad8d45233b /drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | |
parent | 001351881da1822b06e5d92e1fa2bf4920318e8c (diff) |
mwifiex: fix NULL pointer dereference error
In mwifiex_enable_hs, we need to check if
priv->wdev.wiphy->wowlan_config is NULL before accessing its member.
This sometimes cause kernel panic when suspend/resume.
Signed-off-by: Wei-Ning Huang <wnhuang@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/sta_ioctl.c')
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c index d5c56eb9e985..d8de432d46a2 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c @@ -509,7 +509,8 @@ int mwifiex_enable_hs(struct mwifiex_adapter *adapter) if (priv && priv->sched_scanning) { #ifdef CONFIG_PM - if (!priv->wdev.wiphy->wowlan_config->nd_config) { + if (priv->wdev.wiphy->wowlan_config && + !priv->wdev.wiphy->wowlan_config->nd_config) { #endif mwifiex_dbg(adapter, CMD, "aborting bgscan!\n"); mwifiex_stop_bg_scan(priv); |