summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-03-08 00:06:27 -0800
committerJeff Garzik <jeff@garzik.org>2006-03-11 13:29:09 -0500
commit0992a5d029181421877a716eaf99145828ff7eae (patch)
treef03e939152dc9b5c9552f2f1c94464c124da2b0e
parentb2cba5b5777123c53852639c6a17e87709e055be (diff)
[PATCH] 3c509: bus registration fix
- Don't call eisa_driver_unregister() if eisa_driver_register() failed. - Properly propagate error values. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/net/3c509.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c
index 824e430486c2..830528dce0ca 100644
--- a/drivers/net/3c509.c
+++ b/drivers/net/3c509.c
@@ -1574,6 +1574,7 @@ MODULE_LICENSE("GPL");
static int __init el3_init_module(void)
{
+ int ret = 0;
el3_cards = 0;
if (debug >= 0)
@@ -1589,14 +1590,16 @@ static int __init el3_init_module(void)
}
#ifdef CONFIG_EISA
- if (eisa_driver_register (&el3_eisa_driver) < 0) {
- eisa_driver_unregister (&el3_eisa_driver);
- }
+ ret = eisa_driver_register(&el3_eisa_driver);
#endif
#ifdef CONFIG_MCA
- mca_register_driver(&el3_mca_driver);
+ {
+ int err = mca_register_driver(&el3_mca_driver);
+ if (ret == 0)
+ ret = err;
+ }
#endif
- return 0;
+ return ret;
}
static void __exit el3_cleanup_module(void)