aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videobuf-dma-contig.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2008-12-09 23:54:32 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:27 -0400
commitd4db588ccc738528601947d57fd398bb3f55cd31 (patch)
treed6e994732000572bd9eddfdd28721b8c7904ad20 /drivers/media/video/videobuf-dma-contig.c
parent87e3495c316bf3b63512eb280fd4b2d6d3518755 (diff)
V4L/DVB (10304): buf-dma-contig: fix USERPTR free handling
This patch fixes a free-without-alloc bug for V4L2_MEMORY_USERPTR video buffers. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/videobuf-dma-contig.c')
-rw-r--r--drivers/media/video/videobuf-dma-contig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c
index 31944b11e6ea..6109fb5f34e2 100644
--- a/drivers/media/video/videobuf-dma-contig.c
+++ b/drivers/media/video/videobuf-dma-contig.c
@@ -400,7 +400,7 @@ void videobuf_dma_contig_free(struct videobuf_queue *q,
400 So, it should free memory only if the memory were allocated for 400 So, it should free memory only if the memory were allocated for
401 read() operation. 401 read() operation.
402 */ 402 */
403 if ((buf->memory != V4L2_MEMORY_USERPTR) || !buf->baddr) 403 if ((buf->memory != V4L2_MEMORY_USERPTR) || buf->baddr)
404 return; 404 return;
405 405
406 if (!mem) 406 if (!mem)