]> err.no Git - linux-2.6/commitdiff
V4L/DVB (6581): Fix: avoids negative vma usage count
authorMauro Carvalho Chehab <mchehab@infradead.org>
Sat, 10 Nov 2007 13:26:20 +0000 (10:26 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 11 Dec 2007 20:08:07 +0000 (18:08 -0200)
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/em28xx/em28xx-video.c

index d3dd6a0fc8a171aa73d832258361b739ba0c3b3b..0906bc5766cc0b46becbe85735df042333c56b59 100644 (file)
@@ -571,7 +571,9 @@ static void em28xx_vm_close(struct vm_area_struct *vma)
 {
        /* NOTE: buffers are not freed here */
        struct em28xx_frame_t *f = vma->vm_private_data;
-       f->vma_use_count--;
+
+       if (f->vma_use_count)
+               f->vma_use_count--;
 }
 
 static struct vm_operations_struct em28xx_vm_ops = {