diff options
-rw-r--r-- | drivers/eisa/eisa-bus.c | 7 | ||||
-rw-r--r-- | drivers/net/3c59x.c | 20 | ||||
-rw-r--r-- | drivers/net/dgrs.c | 14 |
3 files changed, 20 insertions, 21 deletions
diff --git a/drivers/eisa/eisa-bus.c b/drivers/eisa/eisa-bus.c index 4196137e66de..6078e2f58817 100644 --- a/drivers/eisa/eisa-bus.c +++ b/drivers/eisa/eisa-bus.c | |||
@@ -135,13 +135,8 @@ struct bus_type eisa_bus_type = { | |||
135 | 135 | ||
136 | int eisa_driver_register (struct eisa_driver *edrv) | 136 | int eisa_driver_register (struct eisa_driver *edrv) |
137 | { | 137 | { |
138 | int r; | ||
139 | |||
140 | edrv->driver.bus = &eisa_bus_type; | 138 | edrv->driver.bus = &eisa_bus_type; |
141 | if ((r = driver_register (&edrv->driver)) < 0) | 139 | return driver_register (&edrv->driver); |
142 | return r; | ||
143 | |||
144 | return 0; | ||
145 | } | 140 | } |
146 | 141 | ||
147 | void eisa_driver_unregister (struct eisa_driver *edrv) | 142 | void eisa_driver_unregister (struct eisa_driver *edrv) |
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 5d11a06ecb2c..d339308539fa 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -1096,14 +1096,18 @@ static int __init vortex_eisa_init (void) | |||
1096 | int orig_cards_found = vortex_cards_found; | 1096 | int orig_cards_found = vortex_cards_found; |
1097 | 1097 | ||
1098 | #ifdef CONFIG_EISA | 1098 | #ifdef CONFIG_EISA |
1099 | if (eisa_driver_register (&vortex_eisa_driver) >= 0) { | 1099 | int err; |
1100 | /* Because of the way EISA bus is probed, we cannot assume | 1100 | |
1101 | * any device have been found when we exit from | 1101 | err = eisa_driver_register (&vortex_eisa_driver); |
1102 | * eisa_driver_register (the bus root driver may not be | 1102 | if (!err) { |
1103 | * initialized yet). So we blindly assume something was | 1103 | /* |
1104 | * found, and let the sysfs magic happend... */ | 1104 | * Because of the way EISA bus is probed, we cannot assume |
1105 | 1105 | * any device have been found when we exit from | |
1106 | eisa_found = 1; | 1106 | * eisa_driver_register (the bus root driver may not be |
1107 | * initialized yet). So we blindly assume something was | ||
1108 | * found, and let the sysfs magic happend... | ||
1109 | */ | ||
1110 | eisa_found = 1; | ||
1107 | } | 1111 | } |
1108 | #endif | 1112 | #endif |
1109 | 1113 | ||
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- | |||
1551 | static int __init dgrs_init_module (void) | 1551 | static int __init dgrs_init_module (void) |
1552 | { | 1552 | { |
1553 | int i; | 1553 | int i; |
1554 | int cardcount = 0; | 1554 | int err; |
1555 | 1555 | ||
1556 | /* | 1556 | /* |
1557 | * Command line variable overrides | 1557 | * Command line variable overrides |
@@ -1593,13 +1593,13 @@ static int __init dgrs_init_module (void) | |||
1593 | * Find and configure all the cards | 1593 | * Find and configure all the cards |
1594 | */ | 1594 | */ |
1595 | #ifdef CONFIG_EISA | 1595 | #ifdef CONFIG_EISA |
1596 | cardcount = eisa_driver_register(&dgrs_eisa_driver); | 1596 | err = eisa_driver_register(&dgrs_eisa_driver); |
1597 | if (cardcount < 0) | 1597 | if (err) |
1598 | return cardcount; | 1598 | return err; |
1599 | #endif | 1599 | #endif |
1600 | cardcount = pci_register_driver(&dgrs_pci_driver); | 1600 | err = pci_register_driver(&dgrs_pci_driver); |
1601 | if (cardcount) | 1601 | if (err) |
1602 | return cardcount; | 1602 | return err; |
1603 | return 0; | 1603 | return 0; |
1604 | } | 1604 | } |
1605 | 1605 | ||