This is a note to let you know that I've just added the patch titled ASoC: topology: Check return value of soc_tplg_dai_config to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: asoc-topology-check-return-value-of-soc_tplg_dai_con.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit f36ac5221be109965d37312ac8fc2d1283e05c2d Author: Amadeusz SÅ?awiÅ?ski <amadeuszx.slawinski@xxxxxxxxxxxxxxx> Date: Fri Mar 27 16:47:29 2020 -0400 ASoC: topology: Check return value of soc_tplg_dai_config [ Upstream commit dd8e871d4e560eeb8d22af82dde91457ad835a63 ] Function soc_tplg_dai_config can fail, check for and handle possible failure. Signed-off-by: Amadeusz SÅ?awiÅ?ski <amadeuszx.slawinski@xxxxxxxxxxxxxxx> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@xxxxxxxxxxxxxxx> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20200327204729.397-7-amadeuszx.slawinski@xxxxxxxxxxxxxxx Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 22960f5932c7f..2d4a5a3058c41 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -2431,7 +2431,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); @@ -2446,7 +2446,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)); }