diff options
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 441285ade024..85b7d548f167 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1619,12 +1619,14 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card) | |||
1619 | #ifdef CONFIG_SND_SOC_AC97_BUS | 1619 | #ifdef CONFIG_SND_SOC_AC97_BUS |
1620 | /* register any AC97 codecs */ | 1620 | /* register any AC97 codecs */ |
1621 | for (i = 0; i < card->num_rtd; i++) { | 1621 | for (i = 0; i < card->num_rtd; i++) { |
1622 | ret = soc_register_ac97_dai_link(&card->rtd[i]); | 1622 | ret = soc_register_ac97_dai_link(&card->rtd[i]); |
1623 | if (ret < 0) { | 1623 | if (ret < 0) { |
1624 | printk(KERN_ERR "asoc: failed to register AC97 %s\n", card->name); | 1624 | printk(KERN_ERR "asoc: failed to register AC97 %s\n", card->name); |
1625 | goto probe_dai_err; | 1625 | while (--i >= 0) |
1626 | } | 1626 | soc_unregister_ac97_dai_link(&card->rtd[i]); |
1627 | goto probe_dai_err; | ||
1627 | } | 1628 | } |
1629 | } | ||
1628 | #endif | 1630 | #endif |
1629 | 1631 | ||
1630 | card->instantiated = 1; | 1632 | card->instantiated = 1; |
@@ -3072,7 +3074,9 @@ int snd_soc_register_dais(struct device *dev, | |||
3072 | pr_debug("Registered DAI '%s'\n", dai->name); | 3074 | pr_debug("Registered DAI '%s'\n", dai->name); |
3073 | } | 3075 | } |
3074 | 3076 | ||
3077 | mutex_lock(&client_mutex); | ||
3075 | snd_soc_instantiate_cards(); | 3078 | snd_soc_instantiate_cards(); |
3079 | mutex_unlock(&client_mutex); | ||
3076 | return 0; | 3080 | return 0; |
3077 | 3081 | ||
3078 | err: | 3082 | err: |