* [PATCH] net: ethernet: fix kernel OOPS when remove davinci_mdio module
@ 2012-08-30 16:37 Bin Liu
2012-08-31 20:35 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Bin Liu @ 2012-08-30 16:37 UTC (permalink / raw)
To: mugunthanvnm, vaibhav.bedia, netdev, linux-kernel; +Cc: b-liu
davinci mdio device is not unregistered from mdiobus when removing
the module, which causes BUG_ON() when free the device from mdiobus.
Calling mdiobus_unregister() before mdiobus_free() fixes the issue.
Signed-off-by: Bin Liu <b-liu@ti.com>
---
drivers/net/ethernet/ti/davinci_mdio.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index 0c2fcdd..7de19a5 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -391,8 +391,10 @@ static int __devexit davinci_mdio_remove(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct davinci_mdio_data *data = dev_get_drvdata(dev);
- if (data->bus)
+ if (data->bus) {
+ mdiobus_unregister(data->bus);
mdiobus_free(data->bus);
+ }
if (data->clk)
clk_put(data->clk);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: ethernet: fix kernel OOPS when remove davinci_mdio module
2012-08-30 16:37 [PATCH] net: ethernet: fix kernel OOPS when remove davinci_mdio module Bin Liu
@ 2012-08-31 20:35 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-08-31 20:35 UTC (permalink / raw)
To: b-liu; +Cc: mugunthanvnm, vaibhav.bedia, netdev, linux-kernel
From: Bin Liu <b-liu@ti.com>
Date: Thu, 30 Aug 2012 11:37:32 -0500
> davinci mdio device is not unregistered from mdiobus when removing
> the module, which causes BUG_ON() when free the device from mdiobus.
>
> Calling mdiobus_unregister() before mdiobus_free() fixes the issue.
>
> Signed-off-by: Bin Liu <b-liu@ti.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-31 20:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-30 16:37 [PATCH] net: ethernet: fix kernel OOPS when remove davinci_mdio module Bin Liu
2012-08-31 20:35 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.