提交 e410ddb8 编写于 作者: N Neil Armstrong 提交者: David S. Miller

net: dsa: add missing dsa_switch mdiobus remove

To prevent memory leakage on unbinding, add missing mdiobus unregister
and unallocation calls.
Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1023d2ec
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册