[PATCH] ASoC: Display the error code when we fail to add a DAPM control

Subsystems: sound, sound - soc layer / dynamic audio power management (asoc), the rest

STALE5513d

2 messages, 2 authors, 2011-09-06 · open the first message on its own page

[PATCH] ASoC: Display the error code when we fail to add a DAPM control

From: Mark Brown <hidden>
Date: 2011-09-05 17:51:48

Useful for diagnostics.

Signed-off-by: Mark Brown <redacted>
---
 sound/soc/soc-dapm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 170c4ff..681afc5 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -584,8 +584,8 @@ static int dapm_new_mux(struct snd_soc_dapm_widget *w)
 					name + prefix_len, prefix);
 		ret = snd_ctl_add(card, kcontrol);
 		if (ret < 0) {
-			dev_err(dapm->dev,
-				"asoc: failed to add kcontrol %s\n", w->name);
+			dev_err(dapm->dev, "failed to add kcontrol %s: %d\n",
+				w->name, ret);
 			kfree(wlist);
 			return ret;
 		}
-- 
1.7.5.4

Re: [PATCH] ASoC: Display the error code when we fail to add a DAPM control

From: Girdwood, Liam <hidden>
Date: 2011-09-06 00:40:32

On 5 September 2011 18:51, Mark Brown
[off-list ref]wrote:
quoted hunk
Useful for diagnostics.

Signed-off-by: Mark Brown <redacted>
---
 sound/soc/soc-dapm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 170c4ff..681afc5 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -584,8 +584,8 @@ static int dapm_new_mux(struct snd_soc_dapm_widget *w)
                                       name + prefix_len, prefix);
               ret = snd_ctl_add(card, kcontrol);
               if (ret < 0) {
-                       dev_err(dapm->dev,
-                               "asoc: failed to add kcontrol %s\n",
w->name);
+                       dev_err(dapm->dev, "failed to add kcontrol %s:
%d\n",
+                               w->name, ret);
                       kfree(wlist);
                       return ret;
               }
--
1.7.5.4

Acked-by: Liam Girdwood <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help