V4L/DVB (12776): tm6000: decrement users count

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Mauro Carvalho Chehab 2007-06-17 17:14:12 -03:00
parent 2cd4fd1e57
commit a58d35cb93

View File

@ -1441,8 +1441,12 @@ static int tm6000_release(struct inode *inode, struct file *file)
dprintk(dev, V4L2_DEBUG_OPEN, "tm6000: close called (minor=%d, users=%d)\n",minor,dev->users);
tm6000_stop_thread(vidq);
videobuf_mmap_free(&fh->vb_vidq);
dev->users--;
if (!dev->users) {
tm6000_stop_thread(vidq);
videobuf_mmap_free(&fh->vb_vidq);
}
kfree (fh);