diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-01-06 18:24:07 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-01-06 18:24:07 +0900 |
commit | f862f904d357dc0d3612347a8dbabe6fae037fbb (patch) | |
tree | d7f5c2d5f85fd9e1cfc36beae904dc4f9cca04a3 /sound/soc/soc-core.c | |
parent | 6f09e41d704fe0bc9157a5357480751d39361d01 (diff) | |
parent | 3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5 (diff) | |
download | op-kernel-dev-f862f904d357dc0d3612347a8dbabe6fae037fbb.zip op-kernel-dev-f862f904d357dc0d3612347a8dbabe6fae037fbb.tar.gz |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-latest
Conflicts:
arch/sh/kernel/cpu/sh2a/clock-sh7201.c
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
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 441285a..85b7d54 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) #ifdef CONFIG_SND_SOC_AC97_BUS /* register any AC97 codecs */ for (i = 0; i < card->num_rtd; i++) { - ret = soc_register_ac97_dai_link(&card->rtd[i]); - if (ret < 0) { - printk(KERN_ERR "asoc: failed to register AC97 %s\n", card->name); - goto probe_dai_err; - } + ret = soc_register_ac97_dai_link(&card->rtd[i]); + if (ret < 0) { + printk(KERN_ERR "asoc: failed to register AC97 %s\n", card->name); + while (--i >= 0) + soc_unregister_ac97_dai_link(&card->rtd[i]); + goto probe_dai_err; } + } #endif card->instantiated = 1; @@ -3072,7 +3074,9 @@ int snd_soc_register_dais(struct device *dev, pr_debug("Registered DAI '%s'\n", dai->name); } + mutex_lock(&client_mutex); snd_soc_instantiate_cards(); + mutex_unlock(&client_mutex); return 0; err: |