summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>2020-03-27 16:47:28 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-10 10:30:06 +0200
commiteaec9f8421fa8380b88218f082e9ad1aa3c80b8a (patch)
tree94169917645c3f35be2fa23c65af504d0773ef86
parentc56680ee2ba36feecb09e24645b23a7ef7332c36 (diff)
downloadlinux-stable-eaec9f8421fa8380b88218f082e9ad1aa3c80b8a.tar.gz
linux-stable-eaec9f8421fa8380b88218f082e9ad1aa3c80b8a.tar.bz2
linux-stable-eaec9f8421fa8380b88218f082e9ad1aa3c80b8a.zip
ASoC: topology: Check return value of pcm_new_ver
[ Upstream commit b3677fc3d68dd942c92de52f0bd9dd8b472a40e6 ] Function pcm_new_ver can fail, so we should check it's return value and handle possible error. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200327204729.397-6-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--sound/soc/soc-topology.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 756dd2303106..2c6598e07dde 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1923,7 +1923,9 @@ static int soc_tplg_pcm_elems_load(struct soc_tplg *tplg,
_pcm = pcm;
} else {
abi_match = false;
- pcm_new_ver(tplg, pcm, &_pcm);
+ ret = pcm_new_ver(tplg, pcm, &_pcm);
+ if (ret < 0)
+ return ret;
}
/* create the FE DAIs and DAI links */