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>
This commit is contained in:
Amadeusz Sławiński 2020-03-27 16:47:28 -04:00 committed by Mark Brown
parent 6856e887ea
commit b3677fc3d6
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 3 additions and 1 deletions

View File

@ -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 */