summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-10 11:26:20 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-11-10 11:26:20 -0200
commit42e162c6e5822c3dd698a9e1f77f6b3387236d73 (patch)
tree45e9c82ff86f430e75b23425ae461a78314e6c3b /linux/drivers/media/video
parent48367f67743ac8d9ec4f445d6e8ef253467195cf (diff)
downloadmediapointer-dvb-s2-42e162c6e5822c3dd698a9e1f77f6b3387236d73.tar.gz
mediapointer-dvb-s2-42e162c6e5822c3dd698a9e1f77f6b3387236d73.tar.bz2
Fix: avoids negative vma usage count
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c
index c75111219..db3e314a6 100644
--- a/linux/drivers/media/video/em28xx/em28xx-video.c
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c
@@ -568,7 +568,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 = {