diff options
Diffstat (limited to 'drivers/net/smc-ultra.c')
-rw-r--r-- | drivers/net/smc-ultra.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/net/smc-ultra.c b/drivers/net/smc-ultra.c index b564c677c6d2..ba8593ac3f8a 100644 --- a/drivers/net/smc-ultra.c +++ b/drivers/net/smc-ultra.c @@ -68,6 +68,7 @@ static const char version[] = #include <linux/etherdevice.h> #include <asm/io.h> +#include <asm/irq.h> #include <asm/system.h> #include "8390.h" @@ -194,12 +195,7 @@ struct net_device * __init ultra_probe(int unit) err = do_ultra_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); @@ -325,6 +321,9 @@ static int __init ultra_probe1(struct net_device *dev, int ioaddr) #endif NS8390_init(dev, 0); + retval = register_netdev(dev); + if (retval) + goto out; return 0; out: release_region(ioaddr, ULTRA_IO_EXTENT); @@ -583,11 +582,8 @@ init_module(void) dev->irq = irq[this_dev]; dev->base_addr = io[this_dev]; if (do_ultra_probe(dev) == 0) { - if (register_netdev(dev) == 0) { - dev_ultra[found++] = dev; - continue; - } - cleanup_card(dev); + dev_ultra[found++] = dev; + continue; } free_netdev(dev); printk(KERN_WARNING "smc-ultra.c: No SMC Ultra card found (i/o = 0x%x).\n", io[this_dev]); |