summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2008-12-10 07:54:32 +0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 19:42:27 +0400
commitd4db588ccc738528601947d57fd398bb3f55cd31 (patch)
treed6e994732000572bd9eddfdd28721b8c7904ad20
parent87e3495c316bf3b63512eb280fd4b2d6d3518755 (diff)
downloadlinux-d4db588ccc738528601947d57fd398bb3f55cd31.tar.xz
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>
-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)