浏览代码

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>
Mark Brown 16 年之前
父节点
当前提交
b8b33cb560
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      sound/soc/soc-dapm.c

+ 5 - 1
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;