* [PATCH] n2: fix confusing error code
@ 2006-10-28 18:47 Akinobu Mita
2006-10-28 22:07 ` Krzysztof Halasa
2006-11-01 1:20 ` Jeff Garzik
0 siblings, 2 replies; 3+ messages in thread
From: Akinobu Mita @ 2006-10-28 18:47 UTC (permalink / raw)
To: linux-kernel, linux-netdev; +Cc: Jeff Garzik, Krzysztof Halasa
modprobe n2 with no parameters or no such devices
will get confusing error message.
# modprobe n2
... Kernel does not have module support
This patch replaces return code from -ENOSYS to -EINVAL.
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
drivers/net/wan/n2.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: work-fault-inject/drivers/net/wan/n2.c
===================================================================
--- work-fault-inject.orig/drivers/net/wan/n2.c
+++ work-fault-inject/drivers/net/wan/n2.c
@@ -500,7 +500,7 @@ static int __init n2_init(void)
#ifdef MODULE
printk(KERN_INFO "n2: no card initialized\n");
#endif
- return -ENOSYS; /* no parameters specified, abort */
+ return -EINVAL; /* no parameters specified, abort */
}
printk(KERN_INFO "%s\n", version);
@@ -538,11 +538,11 @@ static int __init n2_init(void)
n2_run(io, irq, ram, valid[0], valid[1]);
if (*hw == '\x0')
- return first_card ? 0 : -ENOSYS;
+ return first_card ? 0 : -EINVAL;
}while(*hw++ == ':');
printk(KERN_ERR "n2: invalid hardware parameters\n");
- return first_card ? 0 : -ENOSYS;
+ return first_card ? 0 : -EINVAL;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] n2: fix confusing error code
2006-10-28 18:47 [PATCH] n2: fix confusing error code Akinobu Mita
@ 2006-10-28 22:07 ` Krzysztof Halasa
2006-11-01 1:20 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Halasa @ 2006-10-28 22:07 UTC (permalink / raw)
To: Akinobu Mita; +Cc: linux-kernel, linux-netdev, Jeff Garzik, akpm
Akinobu Mita <akinobu.mita@gmail.com> writes:
> modprobe n2 with no parameters or no such devices
> will get confusing error message.
>
> # modprobe n2
> ... Kernel does not have module support
Now that's interesting :-)
> This patch replaces return code from -ENOSYS to -EINVAL.
>
> Cc: Jeff Garzik <jgarzik@pobox.com>
> Cc: Krzysztof Halasa <khc@pm.waw.pl>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>.
Jeff, please apply.
Thanks.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] n2: fix confusing error code
2006-10-28 18:47 [PATCH] n2: fix confusing error code Akinobu Mita
2006-10-28 22:07 ` Krzysztof Halasa
@ 2006-11-01 1:20 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2006-11-01 1:20 UTC (permalink / raw)
To: Akinobu Mita, linux-kernel, linux-netdev, Jeff Garzik,
Krzysztof Halasa
Akinobu Mita wrote:
> modprobe n2 with no parameters or no such devices
> will get confusing error message.
>
> # modprobe n2
> ... Kernel does not have module support
>
> This patch replaces return code from -ENOSYS to -EINVAL.
>
> Cc: Jeff Garzik <jgarzik@pobox.com>
> Cc: Krzysztof Halasa <khc@pm.waw.pl>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
applied
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-11-01 1:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-28 18:47 [PATCH] n2: fix confusing error code Akinobu Mita
2006-10-28 22:07 ` Krzysztof Halasa
2006-11-01 1:20 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox