ASoC: topology: Check return value of soc_tplg_dai_config
Function soc_tplg_dai_config can fail, check for and handle possible failure. 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-7-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Родитель
b3677fc3d6
Коммит
dd8e871d4e
|
@ -2524,7 +2524,7 @@ static int soc_tplg_dai_elems_load(struct soc_tplg *tplg,
|
|||
{
|
||||
struct snd_soc_tplg_dai *dai;
|
||||
int count;
|
||||
int i;
|
||||
int i, ret;
|
||||
|
||||
count = le32_to_cpu(hdr->count);
|
||||
|
||||
|
@ -2539,7 +2539,12 @@ static int soc_tplg_dai_elems_load(struct soc_tplg *tplg,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
soc_tplg_dai_config(tplg, dai);
|
||||
ret = soc_tplg_dai_config(tplg, dai);
|
||||
if (ret < 0) {
|
||||
dev_err(tplg->dev, "ASoC: failed to configure DAI\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
tplg->pos += (sizeof(*dai) + le32_to_cpu(dai->priv.size));
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче