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

Commit bee527f9 authored by Pawel Osciak's avatar Pawel Osciak Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB: videobuf: add missing checks for kzalloc returning NULL

parent cca80b97
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -418,6 +418,8 @@ static void *__videobuf_alloc(size_t size)
	struct videobuf_buffer *vb;

	vb = kzalloc(size+sizeof(*mem),GFP_KERNEL);
	if (!vb)
		return vb;

	mem = vb->priv = ((char *)vb)+size;
	mem->magic=MAGIC_SG_MEM;
+2 −0
Original line number Diff line number Diff line
@@ -138,6 +138,8 @@ static void *__videobuf_alloc(size_t size)
	struct videobuf_buffer *vb;

	vb = kzalloc(size+sizeof(*mem),GFP_KERNEL);
	if (!vb)
		return vb;

	mem = vb->priv = ((char *)vb)+size;
	mem->magic=MAGIC_VMAL_MEM;