aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorNariman Poushin <nariman@opensource.wolfsonmicro.com>2014-03-31 15:47:12 +0100
committerMark Brown <broonie@linaro.org>2014-04-14 17:23:38 +0100
commit261edc7013a7435e40fd5ebb3682eac6fc3c15ea (patch)
tree591056aa0d9deeeb2650f205915f71c1d8969912 /sound/soc/soc-core.c
parentLinux 3.15-rc1 (diff)
downloadlinux-dev-261edc7013a7435e40fd5ebb3682eac6fc3c15ea.tar.xz
linux-dev-261edc7013a7435e40fd5ebb3682eac6fc3c15ea.zip
ASoC: core: Fail probe if we fail to add dai widgets
Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 051c006281f5..d5710fc79b49 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1132,8 +1132,15 @@ static int soc_probe_codec(struct snd_soc_card *card,
driver->num_dapm_widgets);
/* Create DAPM widgets for each DAI stream */
- list_for_each_entry(dai, &codec->component.dai_list, list)
- snd_soc_dapm_new_dai_widgets(&codec->dapm, dai);
+ list_for_each_entry(dai, &codec->component.dai_list, list) {
+ ret = snd_soc_dapm_new_dai_widgets(&codec->dapm, dai);
+
+ if (ret != 0) {
+ dev_err(codec->dev,
+ "Failed to create DAI widgets %d\n", ret);
+ goto err_probe;
+ }
+ }
codec->dapm.idle_bias_off = driver->idle_bias_off;