[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>
This commit is contained in:
committed by
Linus Torvalds
parent
e51c01b084
commit
c2f6fabb2e
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user