diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2006-03-25 03:07:19 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 08:22:53 -0800 |
commit | c2f6fabb2ed3b869bc254c6cdc73d6beaaaf700f (patch) | |
tree | 8744d970a801a64ac3cb64f47e735dc3d33c44b9 /drivers/net/dgrs.c | |
parent | e51c01b08474ea454a965a937fff0407ab6714c7 (diff) |
[PATCH] EISA: tidy-up driver_register() return value
Remove the assumption that driver_register() returns the number of devices
bound to the driver. In fact, it returns zero for success or a negative
error value.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Acked-by: Marc Zyngier <maz@misterjones.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/net/dgrs.c')
-rw-r--r-- | drivers/net/dgrs.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/dgrs.c b/drivers/net/dgrs.c index 32d13166c6e8..e175d4876682 100644 --- a/drivers/net/dgrs.c +++ b/drivers/net/dgrs.c @@ -1551,7 +1551,7 @@ MODULE_PARM_DESC(nicmode, "Digi RightSwitch operating mode (1: switch, 2: multi- static int __init dgrs_init_module (void) { int i; - int cardcount = 0; + int err; /* * Command line variable overrides @@ -1593,13 +1593,13 @@ static int __init dgrs_init_module (void) * Find and configure all the cards */ #ifdef CONFIG_EISA - cardcount = eisa_driver_register(&dgrs_eisa_driver); - if (cardcount < 0) - return cardcount; + err = eisa_driver_register(&dgrs_eisa_driver); + if (err) + return err; #endif - cardcount = pci_register_driver(&dgrs_pci_driver); - if (cardcount) - return cardcount; + err = pci_register_driver(&dgrs_pci_driver); + if (err) + return err; return 0; } |