diff options
author | Alan Cox | 2012-07-30 14:40:06 -0700 |
---|---|---|
committer | Linus Torvalds | 2012-07-30 17:25:13 -0700 |
commit | 5353cf089bb32b69a7515be909c14bf05fe2e81e (patch) | |
tree | 42de69b73904230dfdbedb7ac672cfe3b8fe12cc /drivers/misc/ti-st | |
parent | b57b44ae698944ffc6161352b8ff5c9cf9c592e2 (diff) |
drivers/misc/ti-st/st_core.c: missing NULL check
Addresses https://bugzilla.kernel.org/show_bug.cgi?44431
Reported-by: <rucsoftsec@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/ti-st')
-rw-r--r-- | drivers/misc/ti-st/st_core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/misc/ti-st/st_core.c b/drivers/misc/ti-st/st_core.c index 2b62232c2c6a..acfaeeb9e01a 100644 --- 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 */ |