linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] brcmfmac: check return from kzalloc in brcmf_fweh_process_event
@ 2012-11-19 15:53 John W. Linville
  2012-11-19 17:39 ` Arend van Spriel
  0 siblings, 1 reply; 4+ messages in thread
From: John W. Linville @ 2012-11-19 15:53 UTC (permalink / raw)
  To: linux-wireless
  Cc: Fengguang Wu, Arend van Spriel, Franky Lin, John W. Linville

From: "John W. Linville" <linville@tuxdriver.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
---
 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 1e4188c..fa8fc44 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;
 
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-20 19:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-19 15:53 [PATCH] brcmfmac: check return from kzalloc in brcmf_fweh_process_event John W. Linville
2012-11-19 17:39 ` Arend van Spriel
2012-11-20  7:57   ` Kalle Valo
2012-11-20 19:51     ` Arend van Spriel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).