diff options
Diffstat (limited to 'drivers/net/lne390.c')
-rw-r--r-- | drivers/net/lne390.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/lne390.c b/drivers/net/lne390.c index 179a97c0af69..27f0d8ac4c40 100644 --- a/drivers/net/lne390.c +++ b/drivers/net/lne390.c | |||
@@ -167,12 +167,7 @@ struct net_device * __init lne390_probe(int unit) | |||
167 | err = do_lne390_probe(dev); | 167 | err = do_lne390_probe(dev); |
168 | if (err) | 168 | if (err) |
169 | goto out; | 169 | goto out; |
170 | err = register_netdev(dev); | ||
171 | if (err) | ||
172 | goto out1; | ||
173 | return dev; | 170 | return dev; |
174 | out1: | ||
175 | cleanup_card(dev); | ||
176 | out: | 171 | out: |
177 | free_netdev(dev); | 172 | free_netdev(dev); |
178 | return ERR_PTR(err); | 173 | return ERR_PTR(err); |
@@ -296,7 +291,14 @@ static int __init lne390_probe1(struct net_device *dev, int ioaddr) | |||
296 | dev->poll_controller = ei_poll; | 291 | dev->poll_controller = ei_poll; |
297 | #endif | 292 | #endif |
298 | NS8390_init(dev, 0); | 293 | NS8390_init(dev, 0); |
294 | |||
295 | ret = register_netdev(dev); | ||
296 | if (ret) | ||
297 | goto unmap; | ||
299 | return 0; | 298 | return 0; |
299 | unmap: | ||
300 | if (ei_status.reg0) | ||
301 | iounmap((void *)dev->mem_start); | ||
300 | cleanup: | 302 | cleanup: |
301 | free_irq(dev->irq, dev); | 303 | free_irq(dev->irq, dev); |
302 | return ret; | 304 | return ret; |
@@ -426,11 +428,8 @@ int init_module(void) | |||
426 | dev->base_addr = io[this_dev]; | 428 | dev->base_addr = io[this_dev]; |
427 | dev->mem_start = mem[this_dev]; | 429 | dev->mem_start = mem[this_dev]; |
428 | if (do_lne390_probe(dev) == 0) { | 430 | if (do_lne390_probe(dev) == 0) { |
429 | if (register_netdev(dev) == 0) { | 431 | dev_lne[found++] = dev; |
430 | dev_lne[found++] = dev; | 432 | continue; |
431 | continue; | ||
432 | } | ||
433 | cleanup_card(dev); | ||
434 | } | 433 | } |
435 | free_netdev(dev); | 434 | free_netdev(dev); |
436 | printk(KERN_WARNING "lne390.c: No LNE390 card found (i/o = 0x%x).\n", io[this_dev]); | 435 | printk(KERN_WARNING "lne390.c: No LNE390 card found (i/o = 0x%x).\n", io[this_dev]); |