diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-07-02 13:39:09 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-07-02 13:39:09 +0100 |
commit | d2f6409584e2c62ffad81690562330ff3bf4a458 (patch) | |
tree | 3bdfb97d0b51be2f7f414f2107e97603c1206abb /drivers/net/lne390.c | |
parent | e1b09eba2686eca94a3a188042b518df6044a3c1 (diff) | |
parent | 4a89a04f1ee21a7c1f4413f1ad7dcfac50ff9b63 (diff) | |
download | linux-stable-d2f6409584e2c62ffad81690562330ff3bf4a458.tar.gz linux-stable-d2f6409584e2c62ffad81690562330ff3bf4a458.tar.bz2 linux-stable-d2f6409584e2c62ffad81690562330ff3bf4a458.zip |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
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) err = do_lne390_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); @@ -296,7 +291,14 @@ static int __init lne390_probe1(struct net_device *dev, int ioaddr) dev->poll_controller = ei_poll; #endif NS8390_init(dev, 0); + + ret = register_netdev(dev); + if (ret) + goto unmap; return 0; +unmap: + if (ei_status.reg0) + iounmap((void *)dev->mem_start); cleanup: free_irq(dev->irq, dev); return ret; @@ -426,11 +428,8 @@ int init_module(void) dev->base_addr = io[this_dev]; dev->mem_start = mem[this_dev]; if (do_lne390_probe(dev) == 0) { - if (register_netdev(dev) == 0) { - dev_lne[found++] = dev; - continue; - } - cleanup_card(dev); + dev_lne[found++] = dev; + continue; } free_netdev(dev); printk(KERN_WARNING "lne390.c: No LNE390 card found (i/o = 0x%x).\n", io[this_dev]); |