ASoC: Report error code when failing to add controls

Helps with diagnostics.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
Mark Brown 2010-09-20 19:03:28 +01:00
parent 17cc26cd8c
commit 082100dc92
1 changed files with 2 additions and 2 deletions

View File

@ -1982,8 +1982,8 @@ int snd_soc_add_controls(struct snd_soc_codec *codec,
const struct snd_kcontrol_new *control = &controls[i];
err = snd_ctl_add(card, snd_soc_cnew(control, codec, NULL));
if (err < 0) {
dev_err(codec->dev, "%s: Failed to add %s\n",
codec->name, control->name);
dev_err(codec->dev, "%s: Failed to add %s: %d\n",
codec->name, control->name, err);
return err;
}
}