ASoC: Report error code when failing to add controls
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 20 Sep 2010 18:03:28 +0000 (19:03 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 21 Sep 2010 09:18:02 +0000 (10:18 +0100)
Helps with diagnostics.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
sound/soc/soc-core.c

index 6001b7f0a13861325dd84795a5c8ddb8468814a5..ab01e39a0a815cff6cd84ca030ad54339549a4f7 100644 (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;
                }
        }