summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videobuf-dma-sg.c
diff options
context:
space:
mode:
authorPawel Osciak2010-02-22 17:10:06 +0100
committerMauro Carvalho Chehab2010-02-26 19:11:03 +0100
commitbee527f97963ece5e3f6e6587402197af889865b (patch)
tree0acda315967bc394508836a2ea2e62dc24cfb16e /drivers/media/video/videobuf-dma-sg.c
parentV4L/DVB: cx88-alsa: prevent out-of-range volume setting (diff)
downloadkernel-qcow2-linux-bee527f97963ece5e3f6e6587402197af889865b.tar.gz
kernel-qcow2-linux-bee527f97963ece5e3f6e6587402197af889865b.tar.xz
kernel-qcow2-linux-bee527f97963ece5e3f6e6587402197af889865b.zip
V4L/DVB: videobuf: add missing checks for kzalloc returning NULL
Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/videobuf-dma-sg.c')
-rw-r--r--drivers/media/video/videobuf-dma-sg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c
index fa78555b118b..fcd045e7a1c1 100644
--- a/drivers/media/video/videobuf-dma-sg.c
+++ b/drivers/media/video/videobuf-dma-sg.c
@@ -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;