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

Commit 5353cf08 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds
Browse files

drivers/misc/ti-st/st_core.c: missing NULL check

Addresses https://bugzilla.kernel.org/show_bug.cgi?44431



Reported-by: default avatar <rucsoftsec@gmail.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Cc: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b57b44ae
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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 */