From: John W. Linville Date: Mon, 19 Nov 2012 15:53:32 +0000 (-0500) Subject: brcmfmac: check return from kzalloc in brcmf_fweh_process_event X-Git-Tag: firefly_0821_release~3680^2~1480^2~17^2~141 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5b15d0f449036b0674c5214296572f53974c22ac;p=firefly-linux-kernel-4.4.55.git 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 --- diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c index 1e4188cc1b5a..fa8fc4433417 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;