[PATCH v2 2/5] net: dsa: add missing dsa_switch mdiobus remove

Subsystems: networking [dsa], networking [general], the rest

STALE3986d

2 messages, 2 authors, 2015-10-03 · open the first message on its own page

[PATCH v2 2/5] net: dsa: add missing dsa_switch mdiobus remove

From: Neil Armstrong <hidden>
Date: 2015-10-03 14:26:14

To prevent memory leakage on unbinding, add missing mdiobus unregister
and free calls.

Signed-off-by: Neil Armstrong <redacted>
---
 net/dsa/dsa.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 12cec40..91918a3 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -424,6 +424,8 @@ static void dsa_switch_destroy(struct dsa_switch *ds)
 	if (ds->hwmon_dev)
 		hwmon_device_unregister(ds->hwmon_dev);
 #endif
+	mdiobus_unregister(ds->slave_mii_bus);
+	mdiobus_free(ds->slave_mii_bus);
 }

 #ifdef CONFIG_PM_SLEEP
-- 
1.9.1

Re: [PATCH v2 2/5] net: dsa: add missing dsa_switch mdiobus remove

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2015-10-03 20:26:06

Le 03/10/2015 07:26, Neil Armstrong a écrit :
To prevent memory leakage on unbinding, add missing mdiobus unregister
and free calls.

Signed-off-by: Neil Armstrong <redacted>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help