diff options
Diffstat (limited to 'drivers/net/3c523.c')
-rw-r--r-- | drivers/net/3c523.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c index 8f6b2fa13e28..1247a25f1093 100644 --- a/drivers/net/3c523.c +++ b/drivers/net/3c523.c | |||
@@ -572,6 +572,10 @@ static int __init do_elmc_probe(struct net_device *dev) | |||
572 | dev->flags&=~IFF_MULTICAST; /* Multicast doesn't work */ | 572 | dev->flags&=~IFF_MULTICAST; /* Multicast doesn't work */ |
573 | #endif | 573 | #endif |
574 | 574 | ||
575 | retval = register_netdev(dev); | ||
576 | if (retval) | ||
577 | goto err_out; | ||
578 | |||
575 | return 0; | 579 | return 0; |
576 | err_out: | 580 | err_out: |
577 | mca_set_adapter_procfn(slot, NULL, NULL); | 581 | mca_set_adapter_procfn(slot, NULL, NULL); |
@@ -600,12 +604,7 @@ struct net_device * __init elmc_probe(int unit) | |||
600 | err = do_elmc_probe(dev); | 604 | err = do_elmc_probe(dev); |
601 | if (err) | 605 | if (err) |
602 | goto out; | 606 | goto out; |
603 | err = register_netdev(dev); | ||
604 | if (err) | ||
605 | goto out1; | ||
606 | return dev; | 607 | return dev; |
607 | out1: | ||
608 | cleanup_card(dev); | ||
609 | out: | 608 | out: |
610 | free_netdev(dev); | 609 | free_netdev(dev); |
611 | return ERR_PTR(err); | 610 | return ERR_PTR(err); |
@@ -1288,12 +1287,9 @@ int init_module(void) | |||
1288 | dev->irq=irq[this_dev]; | 1287 | dev->irq=irq[this_dev]; |
1289 | dev->base_addr=io[this_dev]; | 1288 | dev->base_addr=io[this_dev]; |
1290 | if (do_elmc_probe(dev) == 0) { | 1289 | if (do_elmc_probe(dev) == 0) { |
1291 | if (register_netdev(dev) == 0) { | 1290 | dev_elmc[this_dev] = dev; |
1292 | dev_elmc[this_dev] = dev; | 1291 | found++; |
1293 | found++; | 1292 | continue; |
1294 | continue; | ||
1295 | } | ||
1296 | cleanup_card(dev); | ||
1297 | } | 1293 | } |
1298 | free_netdev(dev); | 1294 | free_netdev(dev); |
1299 | if (io[this_dev]==0) | 1295 | if (io[this_dev]==0) |