diff mbox

ASoC: topology: Fix SND_SOC_TPLG_INDEX_ALL for freeing soc topology.

Message ID 20180314204722.14144-1-liam.r.girdwood@linux.intel.com (mailing list archive)
State Accepted
Commit feb12f0cd8d7b1e8df2e6fce19fc9a026a468cc2
Headers show

Commit Message

Liam Girdwood March 14, 2018, 8:47 p.m. UTC
From: Yan Wang <yan.wang@linux.intel.com>

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>
---
 sound/soc/soc-topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown March 19, 2018, 7:08 a.m. UTC | #1
On Wed, Mar 14, 2018 at 08:47:22PM +0000, Liam Girdwood wrote:
> From: Yan Wang <yan.wang@linux.intel.com>
> 
> 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>
> ---

This is missing your signoff...
diff mbox

Patch

diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index f941d37e825b..e752bd7265d5 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -2597,7 +2597,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) {