diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-06-06 03:57:46 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-06-10 14:41:26 -0400 |
commit | f7a01cac7305391433d609bd23241e4138e2fb84 (patch) | |
tree | e76625abe3edceb21c8666d80674b9a9d17afd04 /drivers/net/wireless/cw1200 | |
parent | f28bc92c9530fe39eccfcff392879f19bd234578 (diff) |
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/net/wireless/cw1200')
-rw-r--r-- | drivers/net/wireless/cw1200/wsm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/cw1200/wsm.c b/drivers/net/wireless/cw1200/wsm.c index f3fd9b21872..3ab25f66179 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)); |