mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 23:23:55 +08:00
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>
This commit is contained in:
parent
001351881d
commit
a5c92f0b6a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user