diff options
author | Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> | 2020-03-27 23:47:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-10 11:28:58 +0300 |
commit | f111c1d80638aaa6de3b62b4a77e64c0b4f20725 (patch) | |
tree | ef808469dc76cd9c3eaeb9973ddc468d7dd2dcf0 /sound | |
parent | 929599defc7aef8cee2c0ba836f1b281629e37e2 (diff) | |
download | linux-f111c1d80638aaa6de3b62b4a77e64c0b4f20725.tar.xz |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-topology.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index a215b9ad148c..50aa45525be5 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -1954,7 +1954,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 */ |