diff options
Diffstat (limited to 'drivers/net/ac3200.c')
-rw-r--r-- | drivers/net/ac3200.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/ac3200.c b/drivers/net/ac3200.c index 24fba36b5c1d..91791ba37769 100644 --- a/drivers/net/ac3200.c +++ b/drivers/net/ac3200.c | |||
@@ -146,12 +146,7 @@ struct net_device * __init ac3200_probe(int unit) | |||
146 | err = do_ac3200_probe(dev); | 146 | err = do_ac3200_probe(dev); |
147 | if (err) | 147 | if (err) |
148 | goto out; | 148 | goto out; |
149 | err = register_netdev(dev); | ||
150 | if (err) | ||
151 | goto out1; | ||
152 | return dev; | 149 | return dev; |
153 | out1: | ||
154 | cleanup_card(dev); | ||
155 | out: | 150 | out: |
156 | free_netdev(dev); | 151 | free_netdev(dev); |
157 | return ERR_PTR(err); | 152 | return ERR_PTR(err); |
@@ -273,7 +268,14 @@ static int __init ac_probe1(int ioaddr, struct net_device *dev) | |||
273 | dev->poll_controller = ei_poll; | 268 | dev->poll_controller = ei_poll; |
274 | #endif | 269 | #endif |
275 | NS8390_init(dev, 0); | 270 | NS8390_init(dev, 0); |
271 | |||
272 | retval = register_netdev(dev); | ||
273 | if (retval) | ||
274 | goto out2; | ||
276 | return 0; | 275 | return 0; |
276 | out2: | ||
277 | if (ei_status.reg0) | ||
278 | iounmap((void *)dev->mem_start); | ||
277 | out1: | 279 | out1: |
278 | free_irq(dev->irq, dev); | 280 | free_irq(dev->irq, dev); |
279 | out: | 281 | out: |
@@ -392,11 +394,8 @@ init_module(void) | |||
392 | dev->base_addr = io[this_dev]; | 394 | dev->base_addr = io[this_dev]; |
393 | dev->mem_start = mem[this_dev]; /* Currently ignored by driver */ | 395 | dev->mem_start = mem[this_dev]; /* Currently ignored by driver */ |
394 | if (do_ac3200_probe(dev) == 0) { | 396 | if (do_ac3200_probe(dev) == 0) { |
395 | if (register_netdev(dev) == 0) { | 397 | dev_ac32[found++] = dev; |
396 | dev_ac32[found++] = dev; | 398 | continue; |
397 | continue; | ||
398 | } | ||
399 | cleanup_card(dev); | ||
400 | } | 399 | } |
401 | free_netdev(dev); | 400 | free_netdev(dev); |
402 | printk(KERN_WARNING "ac3200.c: No ac3200 card found (i/o = 0x%x).\n", io[this_dev]); | 401 | printk(KERN_WARNING "ac3200.c: No ac3200 card found (i/o = 0x%x).\n", io[this_dev]); |