[PATCH v2 2/2] staging: wilc1000: fix error values in wilc_debugfs_init()

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

 



If there was an error, returning -EINVAL is more appropriate than -1.

Signed-off-by: Luis de Bethencourt <luisbg@xxxxxxxxxxxxxxx>
Reviewed-by: Julian Calaby <julian.calaby@xxxxxxxxx>
---
 drivers/staging/wilc1000/wilc_debugfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c
index 48797dc..6252931 100644
--- a/drivers/staging/wilc1000/wilc_debugfs.c
+++ b/drivers/staging/wilc1000/wilc_debugfs.c
@@ -115,7 +115,7 @@ static int __init wilc_debugfs_init(void)
 
 	if (!wilc_dir) {
 		printk("ERR, debugfs create dir\n");
-		return -1;
+		return -EINVAL;
 	}
 
 	for (i = 0; i < ARRAY_SIZE(debugfs_info); i++) {
@@ -129,7 +129,7 @@ static int __init wilc_debugfs_init(void)
 		if (!debugfs_files) {
 			printk("ERR fail to create the debugfs file, %s\n", info->name);
 			debugfs_remove_recursive(wilc_dir);
-			return -1;
+			return -EINVAL;
 		}
 	}
 	return 0;
-- 
2.6.4

_______________________________________________
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