projects
/
profile
/
common
/
kernel-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f28bc92
)
cw1200: handle allocation failure in wsm_event_indication()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Thu, 6 Jun 2013 10:57:46 +0000
(
03:57
-0700)
committer
John W. Linville
<linville@tuxdriver.com>
Mon, 10 Jun 2013 18:41:26 +0000
(14:41 -0400)
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>
drivers/net/wireless/cw1200/wsm.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/cw1200/wsm.c
b/drivers/net/wireless/cw1200/wsm.c
index
f3fd9b2
..
3ab25f6
100644
(file)
--- 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));