From 1743f41f40cbd4cb985b63a016e2ea2e007bdfd9 Mon Sep 17 00:00:00 2001 From: "John W. Linville" Date: Mon, 19 Nov 2012 10:53:32 -0500 Subject: [PATCH] brcmfmac: check return from kzalloc in brcmf_fweh_process_event Signed-off-by: John W. Linville Reported-by: Fengguang Wu Acked-by: Arend van Spriel --- drivers/net/wireless/brcm80211/brcmfmac/fweh.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c index 1e4188cc1b5a6..fa8fc44334174 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c @@ -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; -- 2.39.5