summaryrefslogtreecommitdiff
path: root/drivers/media/video/videobuf-dma-contig.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2008-12-10 01:54:32 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:42:27 -0300
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,
So, it should free memory only if the memory were allocated for
read() operation.
*/
- if ((buf->memory != V4L2_MEMORY_USERPTR) || !buf->baddr)
+ if ((buf->memory != V4L2_MEMORY_USERPTR) || buf->baddr)
return;
if (!mem)