diff options
author | Yan Wang <yan.wang@linux.intel.com> | 2018-03-26 11:48:00 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-04-17 07:27:24 -0400 |
commit | feb12f0cd8d7b1e8df2e6fce19fc9a026a468cc2 (patch) | |
tree | 9959d3141c997fe309a0cd53f8e6f9e9401d814e | |
parent | dc29f581fa9d5567c3a01ecfdd7f16b2e613c7fb (diff) |
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 <yan.wang@linux.intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/soc-topology.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
2580 | 2580 | ||
2581 | /* match index */ | 2581 | /* match index */ |
2582 | if (dobj->index != index && | 2582 | if (dobj->index != index && |
2583 | dobj->index != SND_SOC_TPLG_INDEX_ALL) | 2583 | index != SND_SOC_TPLG_INDEX_ALL) |
2584 | continue; | 2584 | continue; |
2585 | 2585 | ||
2586 | switch (dobj->type) { | 2586 | switch (dobj->type) { |