mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
ASoC: topology: Check soc_tplg_add_route return value
[ Upstream commit 6856e887eae3efc0fe56899cb3f969fe063171c5 ] Function soc_tplg_add_route can propagate error code from callback, we should check its return value and handle fail in correct way. 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-5-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
76336d4fa8
commit
0d452c7e30
1 changed files with 3 additions and 1 deletions
|
|
@ -1283,7 +1283,9 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,
|
|||
routes[i]->dobj.index = tplg->index;
|
||||
list_add(&routes[i]->dobj.list, &tplg->comp->dobj_list);
|
||||
|
||||
soc_tplg_add_route(tplg, routes[i]);
|
||||
ret = soc_tplg_add_route(tplg, routes[i]);
|
||||
if (ret < 0)
|
||||
break;
|
||||
|
||||
/* add route, but keep going if some fail */
|
||||
snd_soc_dapm_add_routes(dapm, routes[i], 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue