From: Yan Wang Date: Mon, 26 Mar 2018 15:48:00 +0000 (+0100) Subject: ASoC: topology: Fix bugs of freeing soc topology X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=feb12f0cd8d7b1e8df2e6fce19fc9a026a468cc2;p=openwrt%2Fstaging%2Fblogic.git ASoC: topology: Fix bugs of freeing soc topology In snd_soc_tplg_component_remove(), it should compare index and not dobj->index with SND_SOC_TPLG_INDEX_ALL for removing all topology objects. Signed-off-by: Yan Wang Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 942c6e5eb4b7..5598e891b2b3 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -2580,7 +2580,7 @@ int snd_soc_tplg_component_remove(struct snd_soc_component *comp, u32 index) /* match index */ if (dobj->index != index && - dobj->index != SND_SOC_TPLG_INDEX_ALL) + index != SND_SOC_TPLG_INDEX_ALL) continue; switch (dobj->type) {