Skip to contentSkip to conversation

ASoC: don't call soc_cleanup_card_resources() at snd_soc_instantiate_card()

PATCH In review Kuninori Morimoto 2 participants 3 messages Jun 10, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: don't call soc_cleanup_card_resources() at snd_soc_instantiate_card()

From: Kuninori Morimoto <[email protected]>

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")
---
 sound/soc/soc-core.c | 1 -
 1 file changed, 1 deletion(-)
sound/soc/soc-core.c +0 -1
index 1679990..2a408cc 100644
@@ -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);
Signature · 1 line
2.7.4
#1 lore raw

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

#2 lore raw

Hi Tzung-Bi

Quoted 3 lines

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