[alsa-devel] [PATCH 2/2] ASoC: core: indicate unregister debug message once

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Thu Feb 5 06:34:10 CET 2015


From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

Current snd_soc_unregister_card() indicates unregistered debug
message when it was called. But, it should be called only when
it was really unregistered.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
 sound/soc/soc-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index cd5db21..148c959 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2409,8 +2409,8 @@ int snd_soc_unregister_card(struct snd_soc_card *card)
 		card->instantiated = false;
 		snd_soc_dapm_shutdown(card);
 		soc_cleanup_card_resources(card);
+		dev_dbg(card->dev, "ASoC: Unregistered card '%s'\n", card->name);
 	}
-	dev_dbg(card->dev, "ASoC: Unregistered card '%s'\n", card->name);
 
 	return 0;
 }
-- 
1.7.9.5



More information about the Alsa-devel mailing list