Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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));