From 23b6dd6ff795b3ed4e327d42fbc1e646e1f00e98 Mon Sep 17 00:00:00 2001 From: Dmitry Shmidt Date: Mon, 11 Jul 2011 10:48:09 -0700 Subject: [PATCH] net: wireless: bcmdhd: Fix crash if event queue is empty Signed-off-by: Dmitry Shmidt --- drivers/net/wireless/bcmdhd/wl_cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/bcmdhd/wl_cfg80211.c b/drivers/net/wireless/bcmdhd/wl_cfg80211.c index d9c7e6587698..ef5cd47b278c 100644 --- a/drivers/net/wireless/bcmdhd/wl_cfg80211.c +++ b/drivers/net/wireless/bcmdhd/wl_cfg80211.c @@ -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); -- 2.34.1