net: wireless: bcmdhd: Fix crash if event queue is empty
authorDmitry Shmidt <dimitrysh@google.com>
Mon, 11 Jul 2011 17:48:09 +0000 (10:48 -0700)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:09:57 +0000 (12:09 -0800)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
drivers/net/wireless/bcmdhd/wl_cfg80211.c

index d9c7e65..ef5cd47 100644 (file)
@@ -4892,8 +4892,8 @@ static s32 wl_event_handler(void *data)
                        break;
                e = wl_deq_event(wl);
                if (unlikely(!e)) {
-                       WL_ERR(("eqeue empty..\n"));
-                       BUG();
+                       WL_ERR(("equeue empty..\n"));
+                       return 0;
                }
                WL_DBG(("event type (%d), if idx: %d\n", e->etype, e->emsg.ifidx));
                netdev = dhd_idx2net((struct dhd_pub *)(wl->pub), e->emsg.ifidx);