|
@@ -2928,7 +2928,7 @@ static int __devinit emac_probe(struct platform_device *ofdev,
|
|
|
if (dev->emac_irq != NO_IRQ)
|
|
|
irq_dispose_mapping(dev->emac_irq);
|
|
|
err_free:
|
|
|
- kfree(ndev);
|
|
|
+ free_netdev(ndev);
|
|
|
err_gone:
|
|
|
/* if we were on the bootlist, remove us as we won't show up and
|
|
|
* wake up all waiters to notify them in case they were waiting
|
|
@@ -2971,7 +2971,7 @@ static int __devexit emac_remove(struct platform_device *ofdev)
|
|
|
if (dev->emac_irq != NO_IRQ)
|
|
|
irq_dispose_mapping(dev->emac_irq);
|
|
|
|
|
|
- kfree(dev->ndev);
|
|
|
+ free_netdev(dev->ndev);
|
|
|
|
|
|
return 0;
|
|
|
}
|