Skip to content

Commit feb12f0

Browse files
wangyan42164broonie
authored andcommitted
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 <[email protected]> Signed-off-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent dc29f58 commit feb12f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/soc-topology.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2580,7 +2580,7 @@ int snd_soc_tplg_component_remove(struct snd_soc_component *comp, u32 index)
25802580

25812581
/* match index */
25822582
if (dobj->index != index &&
2583-
dobj->index != SND_SOC_TPLG_INDEX_ALL)
2583+
index != SND_SOC_TPLG_INDEX_ALL)
25842584
continue;
25852585

25862586
switch (dobj->type) {

0 commit comments

Comments
 (0)