diff options
author | Amit Choudhary <amit2030@gmail.com> | 2007-03-30 16:34:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-04-27 14:45:20 -0400 |
commit | 20ec811eddb362f821c6fd57e5449f3ddb80b466 (patch) | |
tree | 445fd3eff7c29ef32a3c2f906cd32b9e9359e519 /drivers/media | |
parent | aaa40cb8b7056b597fa77c9f61a1b271c0e341cf (diff) |
V4L/DVB (5489): Codec.c: check kmalloc() return value.
Signed-off-by: Amit Choudhary <amit2030@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/videocodec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/videocodec.c b/drivers/media/video/videocodec.c index 290e64135650..f2bbd7a4d562 100644 --- a/drivers/media/video/videocodec.c +++ b/drivers/media/video/videocodec.c | |||
@@ -348,6 +348,9 @@ videocodec_build_table (void) | |||
348 | kfree(videocodec_buf); | 348 | kfree(videocodec_buf); |
349 | videocodec_buf = kmalloc(size, GFP_KERNEL); | 349 | videocodec_buf = kmalloc(size, GFP_KERNEL); |
350 | 350 | ||
351 | if (!videocodec_buf) | ||
352 | return 0; | ||
353 | |||
351 | i = 0; | 354 | i = 0; |
352 | i += scnprintf(videocodec_buf + i, size - 1, | 355 | i += scnprintf(videocodec_buf + i, size - 1, |
353 | "<S>lave or attached <M>aster name type flags magic "); | 356 | "<S>lave or attached <M>aster name type flags magic "); |