diff options
author | Jeff Garzik <jgarzik@pretzel.yyz.us> | 2005-06-26 23:42:30 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-26 23:42:30 -0400 |
commit | f45727d52d1581e9ff4df9d1a12a60789ad2d1eb (patch) | |
tree | 773ae25f98542e6d382c688f7e85e8137d065614 /drivers/net/hp.c | |
parent | 4c925f452cfd16c690209e96821ee094e09a2404 (diff) | |
parent | 5696c1944a33b4434a9a1ebb6383b906afd43a10 (diff) | |
download | linux-stable-f45727d52d1581e9ff4df9d1a12a60789ad2d1eb.tar.gz linux-stable-f45727d52d1581e9ff4df9d1a12a60789ad2d1eb.tar.bz2 linux-stable-f45727d52d1581e9ff4df9d1a12a60789ad2d1eb.zip |
Merge /spare/repo/netdev-2.6/ branch 'ieee80211'
Diffstat (limited to 'drivers/net/hp.c')
-rw-r--r-- | drivers/net/hp.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/hp.c b/drivers/net/hp.c index 026888611d6f..59cf841b14ab 100644 --- a/drivers/net/hp.c +++ b/drivers/net/hp.c @@ -123,12 +123,7 @@ struct net_device * __init hp_probe(int unit) err = do_hp_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); @@ -227,7 +222,12 @@ static int __init hp_probe1(struct net_device *dev, int ioaddr) ei_status.block_output = &hp_block_output; hp_init_card(dev); + retval = register_netdev(dev); + if (retval) + goto out1; return 0; +out1: + free_irq(dev->irq, dev); out: release_region(ioaddr, HP_IO_EXTENT); return retval; @@ -432,11 +432,8 @@ init_module(void) dev->irq = irq[this_dev]; dev->base_addr = io[this_dev]; if (do_hp_probe(dev) == 0) { - if (register_netdev(dev) == 0) { - dev_hp[found++] = dev; - continue; - } - cleanup_card(dev); + dev_hp[found++] = dev; + continue; } free_netdev(dev); printk(KERN_WARNING "hp.c: No HP card found (i/o = 0x%x).\n", io[this_dev]); |