From patchwork Wed Dec 12 05:11:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3.5.y.z, extended, stable] Patch "drivers/net/ethernet/nxp/lpc_eth.c: Call mdiobus_unregister" has been added to staging queue Date: Tue, 11 Dec 2012 19:11:17 -0000 From: Herton Ronaldo Krzesinski X-Patchwork-Id: 205412 Message-Id: <1355289077-31135-1-git-send-email-herton.krzesinski@canonical.com> To: Peter Senna Tschudin Cc: kernel-team@lists.ubuntu.com, "David S. Miller" This is a note to let you know that I have just added a patch titled drivers/net/ethernet/nxp/lpc_eth.c: Call mdiobus_unregister to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree which can be found at: http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.5.y.z tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Herton ------ >From 07823a5e2a58d921b62270b29e94c96e45d2a760 Mon Sep 17 00:00:00 2001 From: Peter Senna Tschudin Date: Sun, 28 Oct 2012 06:12:00 +0000 Subject: [PATCH] drivers/net/ethernet/nxp/lpc_eth.c: Call mdiobus_unregister before mdiobus_free commit 57c10b61c84bfed68b1b317d6f507a392724b9c4 upstream. Based on commit b27393aecf66199f5ddad37c302d3e0cfadbe6c0 Calling mdiobus_free without calling mdiobus_unregister causes BUG_ON(). This patch fixes the issue. The semantic patch that found this issue(http://coccinelle.lip6.fr/): // @@ expression E; @@ ... when != mdiobus_unregister(E); + mdiobus_unregister(E); mdiobus_free(E); // Signed-off-by: Peter Senna Tschudin Tested-by: Roland Stigge Tested-by: Alexandre Pereira da Silva Signed-off-by: David S. Miller Signed-off-by: Herton Ronaldo Krzesinski --- drivers/net/ethernet/nxp/lpc_eth.c | 1 + 1 file changed, 1 insertion(+) -- 1.7.9.5 diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c index 083d671..6793190 100644 --- a/drivers/net/ethernet/nxp/lpc_eth.c +++ b/drivers/net/ethernet/nxp/lpc_eth.c @@ -1543,6 +1543,7 @@ static int lpc_eth_drv_remove(struct platform_device *pdev) pldat->dma_buff_base_p); free_irq(ndev->irq, ndev); iounmap(pldat->net_base); + mdiobus_unregister(pldat->mii_bus); mdiobus_free(pldat->mii_bus); clk_disable(pldat->clk); clk_put(pldat->clk);