diff options
author | Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> | 2020-03-27 16:47:28 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-04-09 12:46:07 +0100 |
commit | b3677fc3d68dd942c92de52f0bd9dd8b472a40e6 (patch) | |
tree | 3555ff63a3f458bceb2fc318ae77c845373d02f3 /sound/soc | |
parent | 6856e887eae3efc0fe56899cb3f969fe063171c5 (diff) |
ASoC: topology: Check return value of pcm_new_ver
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>
Diffstat (limited to 'sound/soc')
-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 cb43994089de..818657b06799 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -2135,7 +2135,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 */ |