From: Stefan Weil on
free_netdev finally calls kfree which makes the contents
of ndev and priv (private data contained in ndev) invalid.

So iounmap should be called before free_netdev.

Cc: David S. Miller <davem(a)davemloft.net>
Cc: Chaithrika U S <chaithrika(a)ti.com>
Cc: Sriramakrishnan <srk(a)ti.com>
Cc: Kevin Hilman <khilman(a)deeprootsystems.com>
Cc: netdev(a)vger.kernel.org
Cc: linux-kernel(a)vger.kernel.org
Signed-off-by: Stefan Weil <weil(a)mail.berlios.de>
---
drivers/net/davinci_emac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 8cc8a43..866e6b8 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -2818,8 +2818,8 @@ static int __devexit davinci_emac_remove(struct platform_device *pdev)
release_mem_region(res->start, res->end - res->start + 1);

unregister_netdev(ndev);
- free_netdev(ndev);
iounmap(priv->remap_addr);
+ free_netdev(ndev);

clk_disable(emac_clk);
clk_put(emac_clk);
--
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/