From: Ian Abbott Date: Fri, 18 Apr 2008 13:47:38 +0000 (+0000) Subject: Use __module_get(THIS_MODULE) instead of try_module_get(THIS_MODULE) as we X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=bb336d5b4f1bef794696adbf8372d8f0d1c7f0f6;p=comedi.git Use __module_get(THIS_MODULE) instead of try_module_get(THIS_MODULE) as we know our own module is active. --- diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index 00465405..2e6f5885 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -1778,10 +1778,7 @@ static int comedi_open(struct inode *inode, struct file *file) return -ENODEV; } ok: - if (!try_module_get(THIS_MODULE)) { - mutex_unlock(&dev->mutex); - return -ENOSYS; - } + __module_get(THIS_MODULE); if (dev->attached) { if (!try_module_get(dev->driver->module)) {