aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videobuf-vmalloc.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-09-06 19:11:35 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 23:02:54 -0400
commit123f8ef64e3996e06a930756b6b2cdede4b18da0 (patch)
tree4cd34a6ce70c6ccd0b80c2267370d3eb30e50ae0 /drivers/media/video/videobuf-vmalloc.c
parente78dcf55520769471c66024b13df7e9e592436f4 (diff)
V4L/DVB (6263): Fix buffer release code
Release code should happen before the cleaning of map variable. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/videobuf-vmalloc.c')
-rw-r--r--drivers/media/video/videobuf-vmalloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/videobuf-vmalloc.c b/drivers/media/video/videobuf-vmalloc.c
index b2abfc9d9a8e..fd059cde63f4 100644
--- a/drivers/media/video/videobuf-vmalloc.c
+++ b/drivers/media/video/videobuf-vmalloc.c
@@ -84,9 +84,11 @@ videobuf_vm_close(struct vm_area_struct *vma)
84 84
85 if (mem->map != map) 85 if (mem->map != map)
86 continue; 86 continue;
87
88 q->ops->buf_release(q,q->bufs[i]);
89
87 mem->map = NULL; 90 mem->map = NULL;
88 q->bufs[i]->baddr = 0; 91 q->bufs[i]->baddr = 0;
89 q->ops->buf_release(q,q->bufs[i]);
90 } 92 }
91 mutex_unlock(&q->lock); 93 mutex_unlock(&q->lock);
92 kfree(map); 94 kfree(map);