aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ne2.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pretzel.yyz.us>2005-06-26 18:09:43 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-26 18:09:43 -0400
commite8c0eee96801f3c3f577b377b89ab01ab36ba7b6 (patch)
treef948a3c24af6e02e7f096c1e6ccdeafd5c80b66c /drivers/net/ne2.c
parent97f568d8e3dc031b092e6086c0534d5411fb2cf5 (diff)
parentaef7b83c92dd0b7e994805440655d1d64147287b (diff)
Merge /spare/repo/netdev-2.6/ branch 'register-netdev'
Diffstat (limited to 'drivers/net/ne2.c')
-rw-r--r--drivers/net/ne2.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/ne2.c b/drivers/net/ne2.c
index 6ebef27dbfa..6d62ada85de 100644
--- a/drivers/net/ne2.c
+++ b/drivers/net/ne2.c
@@ -301,12 +301,7 @@ struct net_device * __init ne2_probe(int unit)
err = do_ne2_probe(dev);
if (err)
goto out;
- err = register_netdev(dev);
- if (err)
- goto out1;
return dev;
-out1:
- cleanup_card(dev);
out:
free_netdev(dev);
return ERR_PTR(err);
@@ -517,7 +512,14 @@ static int __init ne2_probe1(struct net_device *dev, int slot)
dev->poll_controller = ei_poll;
#endif
NS8390_init(dev, 0);
+
+ retval = register_netdev(dev);
+ if (retval)
+ goto out1;
return 0;
+out1:
+ mca_set_adapter_procfn( ei_status.priv, NULL, NULL);
+ free_irq(dev->irq, dev);
out:
release_region(base_addr, NE_IO_EXTENT);
return retval;
@@ -798,11 +800,8 @@ int init_module(void)
dev->mem_end = bad[this_dev];
dev->base_addr = io[this_dev];
if (do_ne2_probe(dev) == 0) {
- if (register_netdev(dev) == 0) {
- dev_ne[found++] = dev;
- continue;
- }
- cleanup_card(dev);
+ dev_ne[found++] = dev;
+ continue;
}
free_netdev(dev);
break;