alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ASoC: topology: Fix error return code in soc_tplg_dapm_widget_create()
@ 2016-08-10 13:43 Wei Yongjun
  2016-08-12 12:29 ` Applied "ASoC: topology: Fix error return code in soc_tplg_dapm_widget_create()" to the asoc tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-08-10 13:43 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai
  Cc: alsa-devel, Wei Yongjun, linux-kernel

Fix to return error code -ENOMEM instead of 0 when failed to create
widget, as done elsewhere in this function.

Fixes: 8a9782346dcc ("ASoC: topology: Add topology core")
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
---
 sound/soc/soc-topology.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 05a18f6..a9e83a2 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1476,6 +1476,7 @@ widget:
 	if (widget == NULL) {
 		dev_err(tplg->dev, "ASoC: failed to create widget %s controls\n",
 			w->name);
+		ret = -ENOMEM;
 		goto hdr_err;
 	}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-12 12:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-10 13:43 [PATCH -next] ASoC: topology: Fix error return code in soc_tplg_dapm_widget_create() Wei Yongjun
2016-08-12 12:29 ` Applied "ASoC: topology: Fix error return code in soc_tplg_dapm_widget_create()" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).