aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc-ultra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/smc-ultra.c')
-rw-r--r--drivers/net/smc-ultra.c16
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[] =
68#include <linux/etherdevice.h> 68#include <linux/etherdevice.h>
69 69
70#include <asm/io.h> 70#include <asm/io.h>
71#include <asm/irq.h>
71#include <asm/system.h> 72#include <asm/system.h>
72 73
73#include "8390.h" 74#include "8390.h"
@@ -194,12 +195,7 @@ struct net_device * __init ultra_probe(int unit)
194 err = do_ultra_probe(dev); 195 err = do_ultra_probe(dev);
195 if (err) 196 if (err)
196 goto out; 197 goto out;
197 err = register_netdev(dev);
198 if (err)
199 goto out1;
200 return dev; 198 return dev;
201out1:
202 cleanup_card(dev);
203out: 199out:
204 free_netdev(dev); 200 free_netdev(dev);
205 return ERR_PTR(err); 201 return ERR_PTR(err);
@@ -325,6 +321,9 @@ static int __init ultra_probe1(struct net_device *dev, int ioaddr)
325#endif 321#endif
326 NS8390_init(dev, 0); 322 NS8390_init(dev, 0);
327 323
324 retval = register_netdev(dev);
325 if (retval)
326 goto out;
328 return 0; 327 return 0;
329out: 328out:
330 release_region(ioaddr, ULTRA_IO_EXTENT); 329 release_region(ioaddr, ULTRA_IO_EXTENT);
@@ -583,11 +582,8 @@ init_module(void)
583 dev->irq = irq[this_dev]; 582 dev->irq = irq[this_dev];
584 dev->base_addr = io[this_dev]; 583 dev->base_addr = io[this_dev];
585 if (do_ultra_probe(dev) == 0) { 584 if (do_ultra_probe(dev) == 0) {
586 if (register_netdev(dev) == 0) { 585 dev_ultra[found++] = dev;
587 dev_ultra[found++] = dev; 586 continue;
588 continue;
589 }
590 cleanup_card(dev);
591 } 587 }
592 free_netdev(dev); 588 free_netdev(dev);
593 printk(KERN_WARNING "smc-ultra.c: No SMC Ultra card found (i/o = 0x%x).\n", io[this_dev]); 589 printk(KERN_WARNING "smc-ultra.c: No SMC Ultra card found (i/o = 0x%x).\n", io[this_dev]);