Subject: [PATCH] pxa168_eth: fix a mdiobus leak

From: Denis Kirjanov <[email-masked]>
Date: Mon, 30 Aug 2010 07:21:38 +0000

mdiobus resources must be released on exit
Signed-off-by: Denis Kirjanov <[email-masked]>
---
 drivers/net/pxa168_eth.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/pxa168_eth.c b/drivers/net/pxa168_eth.c
index 410ea0a..85eddda 100644
--- a/drivers/net/pxa168_eth.c
+++ b/drivers/net/pxa168_eth.c
@@ -1606,6 +1606,8 @@ static int pxa168_eth_remove(struct platform_device *pdev)
 
 	iounmap(pep->base);
 	pep->base = NULL;
+	mdiobus_unregister(pep->smi_bus);
+	mdiobus_free(pep->smi_bus);
 	unregister_netdev(dev);
 	flush_scheduled_work();
 	free_netdev(dev);
-- 
1.6.4.4