Commit d5cf1ed8 authored by Yan Wang's avatar Yan Wang Committed by Greg Kroah-Hartman

ASoC: topology: Fix bugs of freeing soc topology

[ Upstream commit feb12f0c ]

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: default avatarYan Wang <yan.wang@linux.intel.com>
Signed-off-by: default avatarLiam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bd8acfd7
......@@ -2571,7 +2571,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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment