From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
soc_cleanup_card_debugfs() is called from soc_cleanup_card_resources(), but, it is registered in snd_soc_register_card(). Cleanup function should be called from paired function.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/soc-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index db7b070..eb16b44 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1719,8 +1719,6 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card) /* remove and free each DAI */ soc_remove_dai_links(card);
- soc_cleanup_card_debugfs(card); - /* remove the card */ if (card->remove) card->remove(card); @@ -2393,6 +2391,8 @@ int snd_soc_unregister_card(struct snd_soc_card *card) { if (card->instantiated) { snd_soc_remove_card(card); + soc_cleanup_card_debugfs(card); + dev_dbg(card->dev, "ASoC: Unregistered card '%s'\n", card->name); }