Commit f7a01cac authored by Dan Carpenter's avatar Dan Carpenter Committed by John W. Linville

cw1200: handle allocation failure in wsm_event_indication()

Check for allocation failures and return -ENOMEM.  The caller
already expects it.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f28bc92c
......@@ -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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment