brcmfmac: check return from kzalloc in brcmf_fweh_process_event
authorJohn W. Linville <linville@tuxdriver.com>
Mon, 19 Nov 2012 15:53:32 +0000 (10:53 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 20 Nov 2012 19:08:30 +0000 (14:08 -0500)
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
drivers/net/wireless/brcm80211/brcmfmac/fweh.c

index 1e4188cc1b5a6a2b8d596211394cd9dd93dc05f2..fa8fc44334174131e847e1156757aec9bc3f5b33 100644 (file)
@@ -494,6 +494,9 @@ void brcmf_fweh_process_event(struct brcmf_pub *drvr,
                alloc_flag = GFP_ATOMIC;
 
        event = kzalloc(sizeof(*event) + datalen, alloc_flag);
+       if (!event)
+               return;
+
        event->code = code;
        event->ifidx = *ifidx;