[PATCH] staging : Comedi : comedi_fops : Fixed the return error code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixes the checkpatch.pl warning:

WARNING: ENOSYS means 'invalid syscall nr' and nothing else

Regards,

Santosh Pai

>From 502464417255edb52a1db71146e2f33e67df87ce Mon Sep 17 00:00:00 2001
From: sanpai <santhosh.pai88@xxxxxxxxx>
Date: Sun, 21 Jun 2015 15:05:00 +0530
Subject: [PATCH] staging : Comedi : comedi_fops : Fixed the return error code

    try_module_get fails when the reference count of the module is not
    allowed to be incremented ,and hence -EPERM is returned.

Signed-off-by: sanpai <santhosh.pai88@xxxxxxxxx>
---
 drivers/staging/comedi/comedi_fops.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 985d94b..d6a37e9 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2606,7 +2606,7 @@ static int comedi_open(struct inode *inode, struct file *file)
 	}
 	if (dev->attached && dev->use_count == 0) {
 		if (!try_module_get(dev->driver->module)) {
-			rc = -ENOSYS;
+			rc = -EPERM;
 			goto out;
 		}
 		if (dev->open) {
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux