From 5fb5bb9128225243fcdebbcf18ee0e7928387698 Mon Sep 17 00:00:00 2001 From: Larson Jiang Date: Tue, 7 Jan 2014 18:56:15 +0800 Subject: [PATCH] PD #85790: add null pointer protect for p2p interface close --- broadcm_40181/wl_cfgp2p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.20.1