diff options
-rw-r--r-- | drivers/net/ne.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ne.c b/drivers/net/ne.c index b8e2923a1d69..1063093b3afc 100644 --- a/drivers/net/ne.c +++ b/drivers/net/ne.c | |||
@@ -806,8 +806,10 @@ static int __init ne_drv_probe(struct platform_device *pdev) | |||
806 | dev->base_addr = res->start; | 806 | dev->base_addr = res->start; |
807 | dev->irq = platform_get_irq(pdev, 0); | 807 | dev->irq = platform_get_irq(pdev, 0); |
808 | } else { | 808 | } else { |
809 | if (this_dev < 0 || this_dev >= MAX_NE_CARDS) | 809 | if (this_dev < 0 || this_dev >= MAX_NE_CARDS) { |
810 | free_netdev(dev); | ||
810 | return -EINVAL; | 811 | return -EINVAL; |
812 | } | ||
811 | dev->base_addr = io[this_dev]; | 813 | dev->base_addr = io[this_dev]; |
812 | dev->irq = irq[this_dev]; | 814 | dev->irq = irq[this_dev]; |
813 | dev->mem_end = bad[this_dev]; | 815 | dev->mem_end = bad[this_dev]; |