提交 a5c92f0b 编写于 作者: W Wei-Ning Huang 提交者: Kalle Valo

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: NWei-Ning Huang <wnhuang@chromium.org>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 00135188
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册