summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-06-06 03:57:46 -0700
committerJohn W. Linville <linville@tuxdriver.com>2013-06-10 14:41:26 -0400
commitf7a01cac7305391433d609bd23241e4138e2fb84 (patch)
treee76625abe3edceb21c8666d80674b9a9d17afd04 /drivers
parentf28bc92c9530fe39eccfcff392879f19bd234578 (diff)
downloadlinux-f7a01cac7305391433d609bd23241e4138e2fb84.tar.bz2
cw1200: handle allocation failure in wsm_event_indication()
Check for allocation failures and return -ENOMEM. The caller already expects it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/cw1200/wsm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/cw1200/wsm.c b/drivers/net/wireless/cw1200/wsm.c
index f3fd9b218724..3ab25f661793 100644
--- a/drivers/net/wireless/cw1200/wsm.c
+++ b/drivers/net/wireless/cw1200/wsm.c
@@ -929,6 +929,8 @@ static int wsm_event_indication(struct cw1200_common *priv, struct wsm_buf *buf)
}
event = kzalloc(sizeof(struct cw1200_wsm_event), GFP_KERNEL);
+ if (!event)
+ return -ENOMEM;
event->evt.id = __le32_to_cpu(WSM_GET32(buf));
event->evt.data = __le32_to_cpu(WSM_GET32(buf));