diff options
author | Pawel Osciak <p.osciak@samsung.com> | 2010-02-22 13:10:06 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 15:11:03 -0300 |
commit | bee527f97963ece5e3f6e6587402197af889865b (patch) | |
tree | 0acda315967bc394508836a2ea2e62dc24cfb16e /drivers/media/video/videobuf-vmalloc.c | |
parent | cca80b973244cf7cf721b05b33178ba4826dbc5e (diff) | |
download | linux-bee527f97963ece5e3f6e6587402197af889865b.tar.gz linux-bee527f97963ece5e3f6e6587402197af889865b.tar.bz2 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-vmalloc.c')
-rw-r--r-- | drivers/media/video/videobuf-vmalloc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/videobuf-vmalloc.c b/drivers/media/video/videobuf-vmalloc.c index d6e6a28fb6b8..136e09383c06 100644 --- a/drivers/media/video/videobuf-vmalloc.c +++ b/drivers/media/video/videobuf-vmalloc.c @@ -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; |