summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/aeroflex/greth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/aeroflex/greth.c')
-rw-r--r--drivers/net/ethernet/aeroflex/greth.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/aeroflex/greth.c b/drivers/net/ethernet/aeroflex/greth.c
index d77fafbc1530..c560ad06f0be 100644
--- a/drivers/net/ethernet/aeroflex/greth.c
+++ b/drivers/net/ethernet/aeroflex/greth.c
@@ -1539,10 +1539,11 @@ static int greth_of_remove(struct platform_device *of_dev)
mdiobus_unregister(greth->mdio);
unregister_netdev(ndev);
- free_netdev(ndev);
of_iounmap(&of_dev->resource[0], greth->regs, resource_size(&of_dev->resource[0]));
+ free_netdev(ndev);
+
return 0;
}