git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
drivers
/
net
/
hp.c
diff --git
a/drivers/net/hp.c
b/drivers/net/hp.c
index
0268886
..
cf9fb36
100644
(file)
--- a/
drivers/net/hp.c
+++ b/
drivers/net/hp.c
@@
-102,12
+102,6
@@
static int __init do_hp_probe(struct net_device *dev)
return -ENODEV;
}
return -ENODEV;
}
-static void cleanup_card(struct net_device *dev)
-{
- free_irq(dev->irq, dev);
- release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT);
-}
-
#ifndef MODULE
struct net_device * __init hp_probe(int unit)
{
#ifndef MODULE
struct net_device * __init hp_probe(int unit)
{
@@
-123,12
+117,7
@@
struct net_device * __init hp_probe(int unit)
err = do_hp_probe(dev);
if (err)
goto out;
err = do_hp_probe(dev);
if (err)
goto out;
- err = register_netdev(dev);
- if (err)
- goto out1;
return dev;
return dev;
-out1:
- cleanup_card(dev);
out:
free_netdev(dev);
return ERR_PTR(err);
out:
free_netdev(dev);
return ERR_PTR(err);
@@
-227,7
+216,12
@@
static int __init hp_probe1(struct net_device *dev, int ioaddr)
ei_status.block_output = &hp_block_output;
hp_init_card(dev);
ei_status.block_output = &hp_block_output;
hp_init_card(dev);
+ retval = register_netdev(dev);
+ if (retval)
+ goto out1;
return 0;
return 0;
+out1:
+ free_irq(dev->irq, dev);
out:
release_region(ioaddr, HP_IO_EXTENT);
return retval;
out:
release_region(ioaddr, HP_IO_EXTENT);
return retval;
@@
-432,11
+426,8
@@
init_module(void)
dev->irq = irq[this_dev];
dev->base_addr = io[this_dev];
if (do_hp_probe(dev) == 0) {
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]);
}
free_netdev(dev);
printk(KERN_WARNING "hp.c: No HP card found (i/o = 0x%x).\n", io[this_dev]);
@@
-447,6
+438,12
@@
init_module(void)
return -ENXIO;
}
return -ENXIO;
}
+static void cleanup_card(struct net_device *dev)
+{
+ free_irq(dev->irq, dev);
+ release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT);
+}
+
void
cleanup_module(void)
{
void
cleanup_module(void)
{