ASoC: topology: Remove widgets from dobj list
authorAmadeusz Sławiński <amadeuszx.slawinski@intel.com>
Fri, 25 Jan 2019 20:06:43 +0000 (14:06 -0600)
committerMark Brown <broonie@kernel.org>
Tue, 29 Jan 2019 18:03:13 +0000 (18:03 +0000)
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>
sound/soc/soc-topology.c

index b02c416..abc2d80 100644 (file)
@@ -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 */
 }