[alsa-devel] [PATCH 2/7] ASoC: topology: Remove widgets from dobj	list
    Pierre-Louis Bossart 
    pierre-louis.bossart at linux.intel.com
       
    Fri Jan 25 21:06:43 CET 2019
    
    
  
From: Amadeusz Sławiński <amadeuszx.slawinski at intel.com>
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 at intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
---
 sound/soc/soc-topology.c | 2 ++
 1 file changed, 2 insertions(+)
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 */
 }
 
-- 
2.17.1
    
    
More information about the Alsa-devel
mailing list