aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/conex.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2009-07-19 07:09:32 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-07-24 14:03:30 -0300
commit3eb0237d445c23e9f46b11a07bce986eca450640 (patch)
tree6f5ea63141fe3561bd949cf7f7e96dcc90074ab8 /drivers/media/video/gspca/conex.c
parent26e744b6b61066203fd57de0d3962353621e06f8 (diff)
downloadkernel_samsung_aries-3eb0237d445c23e9f46b11a07bce986eca450640.zip
kernel_samsung_aries-3eb0237d445c23e9f46b11a07bce986eca450640.tar.gz
kernel_samsung_aries-3eb0237d445c23e9f46b11a07bce986eca450640.tar.bz2
V4L/DVB (12284): gspca - jpeg subdrivers: Check the result of kmalloc(jpeg header).
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/conex.c')
-rw-r--r--drivers/media/video/gspca/conex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/conex.c b/drivers/media/video/gspca/conex.c
index 219cfa6..8d48ea1 100644
--- a/drivers/media/video/gspca/conex.c
+++ b/drivers/media/video/gspca/conex.c
@@ -846,6 +846,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
/* create the JPEG header */
sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL);
+ if (!sd->jpeg_hdr)
+ return -ENOMEM;
jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width,
0x22); /* JPEG 411 */
jpeg_set_qual(sd->jpeg_hdr, sd->quality);