Skip to content

Commit

Permalink
V4L/DVB (12776): tm6000: decrement users count
Browse files Browse the repository at this point in the history
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed May 18, 2010
1 parent 2cd4fd1 commit a58d35c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/staging/tm6000/tm6000-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a58d35c

Please sign in to comment.