wifi: fix reboot panic issue
authorRongjun Chen <rongjun.chen@amlogic.com>
Tue, 24 Apr 2018 02:56:19 +0000 (10:56 +0800)
committerRongjun Chen <rongjun.chen@amlogic.com>
Thu, 26 Apr 2018 08:55:43 +0000 (16:55 +0800)
Change-Id: Ie32f16fe783f753e81160078f7f166673e9b7932
Signed-off-by: Rongjun Chen <rongjun.chen@amlogic.com>
bcmdhd.1.579.77.41.1.cn/wl_cfg80211.c

index 9e5f3fb6399591225e4e4951bcd76bf3a1467f72..fa886294ae52e95729f291a3c0997e5d00da9b87 100644 (file)
@@ -17082,8 +17082,12 @@ int wl_cfg80211_hang(struct net_device *dev, u16 reason)
 
 s32 wl_cfg80211_down(struct net_device *dev)
 {
-       struct bcm_cfg80211 *cfg = wl_get_cfg(dev);
        s32 err;
+       struct bcm_cfg80211 *cfg = NULL;
+       if (dev == NULL)
+               return err;
+
+       cfg = wl_get_cfg(dev);
 
        WL_DBG(("In\n"));
        if (cfg == NULL)