diff options
Diffstat (limited to 'drivers/net/isa-skeleton.c')
-rw-r--r-- | drivers/net/isa-skeleton.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/isa-skeleton.c b/drivers/net/isa-skeleton.c index 50bebb55e9ee..88ae8a04fabc 100644 --- a/drivers/net/isa-skeleton.c +++ b/drivers/net/isa-skeleton.c | |||
@@ -176,12 +176,7 @@ struct net_device * __init netcard_probe(int unit) | |||
176 | err = do_netcard_probe(dev); | 176 | err = do_netcard_probe(dev); |
177 | if (err) | 177 | if (err) |
178 | goto out; | 178 | goto out; |
179 | err = register_netdev(dev); | ||
180 | if (err) | ||
181 | goto out1; | ||
182 | return dev; | 179 | return dev; |
183 | out1: | ||
184 | cleanup_card(dev); | ||
185 | out: | 180 | out: |
186 | free_netdev(dev); | 181 | free_netdev(dev); |
187 | return ERR_PTR(err); | 182 | return ERR_PTR(err); |
@@ -316,7 +311,15 @@ static int __init netcard_probe1(struct net_device *dev, int ioaddr) | |||
316 | 311 | ||
317 | dev->tx_timeout = &net_tx_timeout; | 312 | dev->tx_timeout = &net_tx_timeout; |
318 | dev->watchdog_timeo = MY_TX_TIMEOUT; | 313 | dev->watchdog_timeo = MY_TX_TIMEOUT; |
314 | |||
315 | err = register_netdev(dev); | ||
316 | if (err) | ||
317 | goto out2; | ||
319 | return 0; | 318 | return 0; |
319 | out2: | ||
320 | #ifdef jumpered_dma | ||
321 | free_dma(dev->dma); | ||
322 | #endif | ||
320 | out1: | 323 | out1: |
321 | #ifdef jumpered_interrupts | 324 | #ifdef jumpered_interrupts |
322 | free_irq(dev->irq, dev); | 325 | free_irq(dev->irq, dev); |
@@ -691,11 +694,8 @@ int init_module(void) | |||
691 | dev->dma = dma; | 694 | dev->dma = dma; |
692 | dev->mem_start = mem; | 695 | dev->mem_start = mem; |
693 | if (do_netcard_probe(dev) == 0) { | 696 | if (do_netcard_probe(dev) == 0) { |
694 | if (register_netdev(dev) == 0) | 697 | this_device = dev; |
695 | this_device = dev; | 698 | return 0; |
696 | return 0; | ||
697 | } | ||
698 | cleanup_card(dev); | ||
699 | } | 699 | } |
700 | free_netdev(dev); | 700 | free_netdev(dev); |
701 | return -ENXIO; | 701 | return -ENXIO; |