From: Amadeusz Sławiński Date: Fri, 25 Jan 2019 20:06:43 +0000 (-0600) Subject: ASoC: topology: Remove widgets from dobj list X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a46e8393d128d4e5f722b47f708a0d5de91e0176;p=linux.git 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 Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index b02c41614f96e..abc2d804d5bf4 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 */ }