From: Larson Jiang Date: Tue, 7 Jan 2014 10:56:15 +0000 (+0800) Subject: PD #85790: add null pointer protect for p2p interface close X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5fb5bb9128225243fcdebbcf18ee0e7928387698;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_dhd-driver.git PD #85790: add null pointer protect for p2p interface close --- diff --git a/broadcm_40181/wl_cfgp2p.c b/broadcm_40181/wl_cfgp2p.c index a890613..e19504f 100755 --- a/broadcm_40181/wl_cfgp2p.c +++ b/broadcm_40181/wl_cfgp2p.c @@ -1615,7 +1615,7 @@ wl_cfgp2p_cancel_listen(struct wl_priv *wl, struct net_device *ndev, if (timer_pending(&wl->p2p->listen_timer)) { del_timer_sync(&wl->p2p->listen_timer); if (notify) - if (ndev && ndev->ieee80211_ptr) { + if (ndev && ndev->ieee80211_ptr && wdev) { #if defined(WL_CFG80211_P2P_DEV_IF) cfg80211_remain_on_channel_expired(wdev, wl->last_roc_id, &wl->remain_on_chan, GFP_KERNEL);