aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-12-18 11:19:30 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2008-12-18 17:21:07 +0000
commitb8b33cb5608a3bb1b072548dc89159ef614096ab (patch)
tree92ecb718d1824d2e649415b98b418406ab825dab /sound/soc/soc-dapm.c
parentASoC: Ease merge difficulties from new architectures (diff)
downloadlinux-dev-b8b33cb5608a3bb1b072548dc89159ef614096ab.tar.xz
linux-dev-b8b33cb5608a3bb1b072548dc89159ef614096ab.zip
ASoC: Complain if we fail to create DAPM controls
This should never happen and it's helpful to identify the specific control that failed when it does happen. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 61d7d85aa578..8863eddbac02 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1320,8 +1320,12 @@ int snd_soc_dapm_new_controls(struct snd_soc_codec *codec,
for (i = 0; i < num; i++) {
ret = snd_soc_dapm_new_control(codec, widget);
- if (ret < 0)
+ if (ret < 0) {
+ printk(KERN_ERR
+ "ASoC: Failed to create DAPM control %s: %d\n",
+ widget->name, ret);
return ret;
+ }
widget++;
}
return 0;