summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-10 10:26:20 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-12-11 18:08:07 -0200
commit63337dd3f5506628e4831b08e39e09d7f1407769 (patch)
treed20a4af2b7febede47031035c6baec640c0dc472 /drivers/media
parent33f7771411c1f815208f6593d8fde8f9a135cea5 (diff)
downloadop-kernel-dev-63337dd3f5506628e4831b08e39e09d7f1407769.zip
op-kernel-dev-63337dd3f5506628e4831b08e39e09d7f1407769.tar.gz
V4L/DVB (6581): Fix: avoids negative vma usage count
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index d3dd6a0..0906bc5 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/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 = {
OpenPOWER on IntegriCloud