| From foo@baz Sun Jun 17 12:07:33 CEST 2018 |
| From: Yan Wang <yan.wang@linux.intel.com> |
| Date: Mon, 26 Mar 2018 16:48:00 +0100 |
| Subject: ASoC: topology: Fix bugs of freeing soc topology |
| |
| From: Yan Wang <yan.wang@linux.intel.com> |
| |
| [ Upstream commit feb12f0cd8d7b1e8df2e6fce19fc9a026a468cc2 ] |
| |
| 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> |
| Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| --- |
| sound/soc/soc-topology.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/sound/soc/soc-topology.c |
| +++ b/sound/soc/soc-topology.c |
| @@ -2571,7 +2571,7 @@ int snd_soc_tplg_component_remove(struct |
| |
| /* match index */ |
| if (dobj->index != index && |
| - dobj->index != SND_SOC_TPLG_INDEX_ALL) |
| + index != SND_SOC_TPLG_INDEX_ALL) |
| continue; |
| |
| switch (dobj->type) { |