From bb336d5b4f1bef794696adbf8372d8f0d1c7f0f6 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Fri, 18 Apr 2008 13:47:38 +0000 Subject: [PATCH] Use __module_get(THIS_MODULE) instead of try_module_get(THIS_MODULE) as we know our own module is active. --- comedi/comedi_fops.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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)) { -- 2.26.2