pxa168_eth: fix a mdiobus leak
authorDenis Kirjanov <dkirjanov@kernel.org>
Sun, 29 Aug 2010 21:21:38 +0000 (21:21 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Sep 2010 21:29:34 +0000 (14:29 -0700)
mdiobus resources must be released on exit

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/pxa168_eth.c

index 410ea0a613718af8c42ac02fdbd3def788757ee4..85eddda276bdf350f17660fd2361b86e059b9001 100644 (file)
@@ -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);