Skip to content

Commit

Permalink
ASoC: Report error code when failing to add controls
Browse files Browse the repository at this point in the history
Helps with diagnostics.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
  • Loading branch information
Mark Brown committed Sep 21, 2010
1 parent 17cc26c commit 082100d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 082100d

Please sign in to comment.