cw1200: handle allocation failure in wsm_event_indication()
Subsystems (2)
PATCH 1/1 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 <[email protected]>
drivers/net/wireless/cw1200/wsm.c +2 -0
@@ -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));