Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1238900 > unrolled thread

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

Started byNeil Armstrong <narmstrong@baylibre.com>
First post2015-10-03 16:30 +0200
Last post2015-10-03 22:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 2/5] net: dsa: add missing dsa_switch mdiobus remove Neil Armstrong <narmstrong@baylibre.com> - 2015-10-03 16:30 +0200
    Re: [PATCH v2 2/5] net: dsa: add missing dsa_switch mdiobus remove Florian Fainelli <f.fainelli@gmail.com> - 2015-10-03 22:30 +0200

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

FromNeil Armstrong <narmstrong@baylibre.com>
Date2015-10-03 16:30 +0200
Subject[PATCH v2 2/5] net: dsa: add missing dsa_switch mdiobus remove
Message-ID<qfvZ0-4oI-25@gated-at.bofh.it>
To prevent memory leakage on unbinding, add missing mdiobus unregister
and free calls.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1238986

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2015-10-03 22:30 +0200
Message-ID<qfBBo-43g-3@gated-at.bofh.it>
In reply to#1238900
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 <narmstrong@baylibre.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web