diff options
author | Neil Armstrong <narmstrong@baylibre.com> | 2015-10-06 16:40:25 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-07 13:56:07 +0200 |
commit | e410ddb89ee8e68103ea58938b4972da594e3d2d (patch) | |
tree | 7c45ef34a509f1d1bba2e0ab8d892ab0ed0a07a4 /net/dsa/dsa.c | |
parent | net: dsa: add missing kfree on remove (diff) | |
download | linux-e410ddb89ee8e68103ea58938b4972da594e3d2d.tar.xz linux-e410ddb89ee8e68103ea58938b4972da594e3d2d.zip |
net: dsa: add missing dsa_switch mdiobus remove
To prevent memory leakage on unbinding, add missing mdiobus unregister
and unallocation calls.
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | net/dsa/dsa.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index ed9d43fd1fec..14fac4ed9569 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 |