From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
soc_cleanup_card_debugfs() is called from soc_cleanup_card_resources(), but, card debugfs is called from snd_soc_register_card(). cleanup function should be called 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 794d8ec..b7ab676 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1729,8 +1729,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); @@ -2403,6 +2401,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); }