[3.5.y.z,extended,stable] Patch "drivers/net/ethernet/nxp/lpc_eth.c: Call mdiobus_unregister" has been added to staging queue

Submitted by Herton Ronaldo Krzesinski on Dec. 12, 2012, 5:11 a.m.


Message ID 1355289077-31135-1-git-send-email-herton.krzesinski@canonical.com
State New
Headers show

Commit Message

Herton Ronaldo Krzesinski Dec. 12, 2012, 5:11 a.m.
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:


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



From 07823a5e2a58d921b62270b29e94c96e45d2a760 Mon Sep 17 00:00:00 2001
From: Peter Senna Tschudin <peter.senna@gmail.com>
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/):
// <smpl>
expression E;
  ... when != mdiobus_unregister(E);

+ mdiobus_unregister(E);
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Tested-by: Roland Stigge <stigge@antcom.de>
Tested-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
 drivers/net/ethernet/nxp/lpc_eth.c |    1 +
 1 file changed, 1 insertion(+)


Patch hide | download patch | download mbox

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)
 	free_irq(ndev->irq, ndev);
+	mdiobus_unregister(pldat->mii_bus);