[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <560FE578.8010503@baylibre.com>
Date: Sat, 3 Oct 2015 16:26:00 +0200
From: Neil Armstrong <narmstrong@...libre.com>
To: "David S. Miller" <davem@...emloft.net>,
Florian Fainelli <f.fainelli@...il.com>,
Guenter Roeck <linux@...ck-us.net>,
vivien.didelot@...oirfairelinux.com, Andrew Lunn <andrew@...n.ch>,
Fabian Frederick <fabf@...net.be>,
Pavel Nakonechny <pavel.nakonechny@...tlab.ru>,
Joe Perches <joe@...ches.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, nbd@...nwrt.org,
sergei.shtylyov@...entembedded.com
Subject: [PATCH v2 2/5] net: dsa: add missing dsa_switch mdiobus remove
To prevent memory leakage on unbinding, add missing mdiobus unregister
and free calls.
Signed-off-by: Neil Armstrong <narmstrong@...libre.com>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists