Skip to contentSkip to conversation

WAN: Fix confusing insmod error code for C101 too.

PATCH Applied Krzysztof Halasa 2 participants 2 messages Apr 20, 2008 – Apr 25, 2008

Subsystems (3)
lore
Share & tools
lore

Krzysztof Halasa

author maintainer
#0 lore raw

PATCH 1/1 WAN: Fix confusing insmod error code for C101 too.

WAN: Fix confusing insmod error code for C101 too.

drivers/net/wan/c101.c +3 -3
index c4c8eab..c2cc42f 100644
@@ -402,7 +402,7 @@ static int __init c101_init(void)
 #ifdef MODULE
 		printk(KERN_INFO "c101: no card initialized\n");
 #endif
-		return -ENOSYS;	/* no parameters specified, abort */
+		return -EINVAL;	/* no parameters specified, abort */
 	}
 
 	printk(KERN_INFO "%s\n", version);
@@ -420,11 +420,11 @@ static int __init c101_init(void)
 			c101_run(irq, ram);
 
 		if (*hw == '\x0')
-			return first_card ? 0 : -ENOSYS;
+			return first_card ? 0 : -EINVAL;
 	}while(*hw++ == ':');
 
 	printk(KERN_ERR "c101: invalid hardware parameters\n");
-	return first_card ? 0 : -ENOSYS;
+	return first_card ? 0 : -EINVAL;
 }
 
 
Applied
#1 lore raw
Quoted 20 lines · Krzysztof Halasa

WAN: Fix confusing insmod error code for C101 too.

drivers/net/wan/c101.c +1 -1
index c4c8eab..c2cc42f 100644
@@ -402,7 +402,7 @@ static int __init c101_init(void)
 #ifdef MODULE
 		printk(KERN_INFO "c101: no card initialized\n");
 #endif
-		return -ENOSYS;	/* no parameters specified, abort */
+		return -EINVAL;	/* no parameters specified, abort */
 	}
 
 	printk(KERN_INFO "%s\n", version);
@@ -420,11 +420,11 @@ static int __init c101_init(void)
 			c101_run(irq, ram);
 

drivers/net/wan/c101.c static int __init c101_init(void) · line 429

Quoted 10 lines
drivers/net/wan/c101.c +2 -2
 		if (*hw == '\x0')
-			return first_card ? 0 : -ENOSYS;
+			return first_card ? 0 : -EINVAL;
 	}while(*hw++ == ':');
 
 	printk(KERN_ERR "c101: invalid hardware parameters\n");
-	return first_card ? 0 : -ENOSYS;
+	return first_card ? 0 : -EINVAL;
 }
 

applied