summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmadeusz Sławiński <amadeuszx.slawinski@intel.com>2019-01-25 14:06:43 -0600
committerMark Brown <broonie@kernel.org>2019-01-29 18:03:13 +0000
commita46e8393d128d4e5f722b47f708a0d5de91e0176 (patch)
tree12e33294cfcfd3f16262e8b47edbab50fa6e53aa
parent33ae6ae2111c3118d8d15eba331b6ba5932825c9 (diff)
downloadlinux-stable-a46e8393d128d4e5f722b47f708a0d5de91e0176.tar.gz
linux-stable-a46e8393d128d4e5f722b47f708a0d5de91e0176.tar.bz2
linux-stable-a46e8393d128d4e5f722b47f708a0d5de91e0176.zip
ASoC: topology: Remove widgets from dobj list
Currently when we unload and reload machine driver few times we end with corrupted list and try to cleanup no longer existing objects. Fix this by removing dobj from the list. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/soc-topology.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index b02c41614f96..abc2d804d5bf 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -493,6 +493,8 @@ static void remove_widget(struct snd_soc_component *comp,
free_news:
kfree(w->kcontrol_news);
+ list_del(&dobj->list);
+
/* widget w is freed by soc-dapm.c */
}