diff mbox

[v2,16/16] wl1251: fix NULL pointer dereference

Message ID 1386494714-21070-17-git-send-email-pali.rohar@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Pali Rohár Dec. 8, 2013, 9:25 a.m. UTC
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 drivers/net/wireless/ti/wl1251/event.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pavel Machek Dec. 10, 2013, 9:42 a.m. UTC | #1
On Sun 2013-12-08 10:25:14, Pali Rohár wrote:
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> Reported-by: Felipe Contreras <felipe.contreras@gmail.com>

Reviewed-by: Pavel Machek <pavel@ucw.cz>

Thanks,
								Pavel
diff mbox

Patch

diff --git a/drivers/net/wireless/ti/wl1251/event.c b/drivers/net/wireless/ti/wl1251/event.c
index 192cebd..db01053 100644
--- a/drivers/net/wireless/ti/wl1251/event.c
+++ b/drivers/net/wireless/ti/wl1251/event.c
@@ -124,7 +124,7 @@  static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox)
 			return ret;
 	}
 
-	if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) {
+	if (wl->vif && vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) {
 		wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT");
 
 		/* indicate to the stack, that beacons have been lost */