Skip to content

Commit

Permalink
[media] bt8xx: remove needless module refcounting
Browse files Browse the repository at this point in the history
It is responsibility of a caller of fops->open(),
to make sure an owner of the fops is available until file is closed.
So, there is no need to lock THIS_MODULE explicitly.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
khoroshilov authored and mchehab committed Jul 8, 2016
1 parent d54fc3b commit 654043f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/media/pci/bt8xx/dst_ca.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,15 +655,13 @@ static long dst_ca_ioctl(struct file *file, unsigned int cmd, unsigned long ioct
static int dst_ca_open(struct inode *inode, struct file *file)
{
dprintk(verbose, DST_CA_DEBUG, 1, " Device opened [%p] ", file);
try_module_get(THIS_MODULE);

return 0;
}

static int dst_ca_release(struct inode *inode, struct file *file)
{
dprintk(verbose, DST_CA_DEBUG, 1, " Device closed.");
module_put(THIS_MODULE);

return 0;
}
Expand Down

0 comments on commit 654043f

Please sign in to comment.