aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 b2abfc9d9a8..fd059cde63f 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)
if (mem->map != map)
continue;
+
+ q->ops->buf_release(q,q->bufs[i]);
+
mem->map = NULL;
q->bufs[i]->baddr = 0;
- q->ops->buf_release(q,q->bufs[i]);
}
mutex_unlock(&q->lock);
kfree(map);