projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b57b44a
)
drivers/misc/ti-st/st_core.c: missing NULL check
author
Alan Cox
<
[email protected]
>
Mon, 30 Jul 2012 21:40:06 +0000
(14:40 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 31 Jul 2012 00:25:13 +0000
(17:25 -0700)
Addresses https://bugzilla.kernel.org/show_bug.cgi?44431
Reported-by: <
[email protected]
>
Signed-off-by: Alan Cox <
[email protected]
>
Cc: Pavan Savoy <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/misc/ti-st/st_core.c
patch
|
blob
|
history
diff --git
a/drivers/misc/ti-st/st_core.c
b/drivers/misc/ti-st/st_core.c
index 2b62232c2c6a3476551f11f86253dcf545234d07..acfaeeb9e01a98e7f296d5c2081f35ef4d53b325 100644
(file)
--- a/
drivers/misc/ti-st/st_core.c
+++ b/
drivers/misc/ti-st/st_core.c
@@
-349,6
+349,11
@@
void st_int_recv(void *disc_data,
st_gdata->rx_skb = alloc_skb(
st_gdata->list[type]->max_frame_size,
GFP_ATOMIC);
+ if (st_gdata->rx_skb == NULL) {
+ pr_err("out of memory: dropping\n");
+ goto done;
+ }
+
skb_reserve(st_gdata->rx_skb,
st_gdata->list[type]->reserve);
/* next 2 required for BT only */