Commit 082100dc authored by Mark Brown's avatar Mark Brown

ASoC: Report error code when failing to add controls

Helps with diagnostics.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 17cc26cd
...@@ -1982,8 +1982,8 @@ int snd_soc_add_controls(struct snd_soc_codec *codec, ...@@ -1982,8 +1982,8 @@ int snd_soc_add_controls(struct snd_soc_codec *codec,
const struct snd_kcontrol_new *control = &controls[i]; const struct snd_kcontrol_new *control = &controls[i];
err = snd_ctl_add(card, snd_soc_cnew(control, codec, NULL)); err = snd_ctl_add(card, snd_soc_cnew(control, codec, NULL));
if (err < 0) { if (err < 0) {
dev_err(codec->dev, "%s: Failed to add %s\n", dev_err(codec->dev, "%s: Failed to add %s: %d\n",
codec->name, control->name); codec->name, control->name, err);
return err; return err;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment