aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-09-25 10:53:24 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 23:02:55 -0400
commitcd4765efdd816ac14075fc7d5adf489502e75e1e (patch)
tree6c7a119255c28349fdcd4b64379c545b8f7f3886 /drivers/media/video
parent3bef5e4a1f73898dc8c8433f938d3a8b22f2be22 (diff)
V4L/DVB (6265): Prevent for calling mmap_free without an allocated buffer
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981 Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/videobuf-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c
index 256501384af7..eb3b98400c1b 100644
--- a/drivers/media/video/videobuf-core.c
+++ b/drivers/media/video/videobuf-core.c
@@ -880,6 +880,9 @@ int videobuf_mmap_free(struct videobuf_queue *q)
880 int i; 880 int i;
881 int rc; 881 int rc;
882 882
883 if (!q)
884 return 0;
885
883 MAGIC_CHECK(q->int_ops->magic,MAGIC_QTYPE_OPS); 886 MAGIC_CHECK(q->int_ops->magic,MAGIC_QTYPE_OPS);
884 887
885 rc = CALL(q,mmap_free,q); 888 rc = CALL(q,mmap_free,q);