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 <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
 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;
 }