Kaynağa Gözat

V4L/DVB (6581): Fix: avoids negative vma usage count

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Mauro Carvalho Chehab 17 yıl önce
ebeveyn
işleme
63337dd3f5
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      drivers/media/video/em28xx/em28xx-video.c

+ 3 - 1
drivers/media/video/em28xx/em28xx-video.c

@@ -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 = {