[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
+12
-8
@@ -1096,14 +1096,18 @@ static int __init vortex_eisa_init (void)
|
||||
int orig_cards_found = vortex_cards_found;
|
||||
|
||||
#ifdef CONFIG_EISA
|
||||
if (eisa_driver_register (&vortex_eisa_driver) >= 0) {
|
||||
/* Because of the way EISA bus is probed, we cannot assume
|
||||
* any device have been found when we exit from
|
||||
* eisa_driver_register (the bus root driver may not be
|
||||
* initialized yet). So we blindly assume something was
|
||||
* found, and let the sysfs magic happend... */
|
||||
|
||||
eisa_found = 1;
|
||||
int err;
|
||||
|
||||
err = eisa_driver_register (&vortex_eisa_driver);
|
||||
if (!err) {
|
||||
/*
|
||||
* Because of the way EISA bus is probed, we cannot assume
|
||||
* any device have been found when we exit from
|
||||
* eisa_driver_register (the bus root driver may not be
|
||||
* initialized yet). So we blindly assume something was
|
||||
* found, and let the sysfs magic happend...
|
||||
*/
|
||||
eisa_found = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user