All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: don't call soc_cleanup_card_resources() at snd_soc_instantiate_card()
@ 2019-06-10  1:13 Kuninori Morimoto
  2019-06-10  2:40 ` Tzung-Bi Shih
  0 siblings, 1 reply; 3+ messages in thread
From: Kuninori Morimoto @ 2019-06-10  1:13 UTC (permalink / raw)
  To: Mark Brown, Fabio Estevam, Tzung-Bi Shih; +Cc: Linux-ALSA

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

commit adb76b5b9c47 ("ASoC: soc-core: remove legacy style dai_link")
removed legacy style dai_link from soc-core, and
commit 70fc53734e71 ("ASoC: core: move DAI pre-links initiation to
snd_soc_instantiate_card") moves soc_init_dai_link() timing.

Because of these, we don't need to call soc_cleanup_card_resources() if
soc_init_dai_link() was failed, otherwise, we will get Kernel crash.

Fixes: adb76b5b9c47 ("ASoC: soc-core: remove legacy style dai_link")
Fixes: 70fc53734e71 ("ASoC: core: move DAI pre-links initiation to snd_soc_instantiate_card")
Reported-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/soc-core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1679990..2a408cc 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1984,7 +1984,6 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
 	for_each_card_prelinks(card, i, dai_link) {
 		ret = soc_init_dai_link(card, dai_link);
 		if (ret) {
-			soc_cleanup_card_resources(card);
 			dev_err(card->dev, "ASoC: failed to init link %s: %d\n",
 				dai_link->name, ret);
 			mutex_unlock(&client_mutex);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: don't call soc_cleanup_card_resources() at snd_soc_instantiate_card()
  2019-06-10  1:13 [PATCH] ASoC: don't call soc_cleanup_card_resources() at snd_soc_instantiate_card() Kuninori Morimoto
@ 2019-06-10  2:40 ` Tzung-Bi Shih
  2019-06-10  3:03   ` Kuninori Morimoto
  0 siblings, 1 reply; 3+ messages in thread
From: Tzung-Bi Shih @ 2019-06-10  2:40 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, Fabio Estevam

The same change has been made and applied to for-next in commit
0779935938b1 ("ASoC: Remove erroneous soc_cleanup_card_resources()
call").

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: don't call soc_cleanup_card_resources() at snd_soc_instantiate_card()
  2019-06-10  2:40 ` Tzung-Bi Shih
@ 2019-06-10  3:03   ` Kuninori Morimoto
  0 siblings, 0 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2019-06-10  3:03 UTC (permalink / raw)
  To: Tzung-Bi Shih; +Cc: Linux-ALSA, Mark Brown, Fabio Estevam


Hi Tzung-Bi

> The same change has been made and applied to for-next in commit
> 0779935938b1 ("ASoC: Remove erroneous soc_cleanup_card_resources()
> call").

Thanks !!
Nice to know


Thank you for your help !!
Best regards
---
Kuninori Morimoto

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-10  3:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-10  1:13 [PATCH] ASoC: don't call soc_cleanup_card_resources() at snd_soc_instantiate_card() Kuninori Morimoto
2019-06-10  2:40 ` Tzung-Bi Shih
2019-06-10  3:03   ` Kuninori Morimoto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.