From: Wei Yongjun Date: Wed, 10 Aug 2016 13:43:12 +0000 (+0000) Subject: ASoC: topology: Fix error return code in soc_tplg_dapm_widget_create() X-Git-Tag: v4.8.6~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e668be87d29c526c3f427f51a24011d6af5e93d8;p=thirdparty%2Fkernel%2Fstable.git ASoC: topology: Fix error return code in soc_tplg_dapm_widget_create() commit 8ae3ea48df0d746b663057cf0b972a18d0777b7b upstream. 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 Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index ee7f15aa46fca..34069076bf8eb 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -1475,6 +1475,7 @@ widget: if (widget == NULL) { dev_err(tplg->dev, "ASoC: failed to create widget %s controls\n", w->name); + ret = -ENOMEM; goto hdr_err; }