aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/hp.c')
-rw-r--r--drivers/net/hp.c17
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)
123 err = do_hp_probe(dev); 123 err = do_hp_probe(dev);
124 if (err) 124 if (err)
125 goto out; 125 goto out;
126 err = register_netdev(dev);
127 if (err)
128 goto out1;
129 return dev; 126 return dev;
130out1:
131 cleanup_card(dev);
132out: 127out:
133 free_netdev(dev); 128 free_netdev(dev);
134 return ERR_PTR(err); 129 return ERR_PTR(err);
@@ -227,7 +222,12 @@ static int __init hp_probe1(struct net_device *dev, int ioaddr)
227 ei_status.block_output = &hp_block_output; 222 ei_status.block_output = &hp_block_output;
228 hp_init_card(dev); 223 hp_init_card(dev);
229 224
225 retval = register_netdev(dev);
226 if (retval)
227 goto out1;
230 return 0; 228 return 0;
229out1:
230 free_irq(dev->irq, dev);
231out: 231out:
232 release_region(ioaddr, HP_IO_EXTENT); 232 release_region(ioaddr, HP_IO_EXTENT);
233 return retval; 233 return retval;
@@ -432,11 +432,8 @@ init_module(void)
432 dev->irq = irq[this_dev]; 432 dev->irq = irq[this_dev];
433 dev->base_addr = io[this_dev]; 433 dev->base_addr = io[this_dev];
434 if (do_hp_probe(dev) == 0) { 434 if (do_hp_probe(dev) == 0) {
435 if (register_netdev(dev) == 0) { 435 dev_hp[found++] = dev;
436 dev_hp[found++] = dev; 436 continue;
437 continue;
438 }
439 cleanup_card(dev);
440 } 437 }
441 free_netdev(dev); 438 free_netdev(dev);
442 printk(KERN_WARNING "hp.c: No HP card found (i/o = 0x%x).\n", io[this_dev]); 439 printk(KERN_WARNING "hp.c: No HP card found (i/o = 0x%x).\n", io[this_dev]);