Skip to content

Commit

Permalink
ASoC: Complain if we fail to create DAPM controls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Dec 18, 2008
1 parent 0b34a3d commit b8b33cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b8b33cb

Please sign in to comment.