From 3bb936f5b92a0a6b6f4d16d834243e2f62521349 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Amadeusz=20S=C5=82awi=C5=84ski?= Date: Wed, 5 Jun 2019 15:45:53 +0200 Subject: [PATCH] ASoC: core: Tell codec that jack is being removed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When component is being removed we should disable jack, otherwise some codecs will try to trigger interrupt using freed structures. Signed-off-by: Amadeusz Sławiński Signed-off-by: Mark Brown --- sound/soc/soc-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 7abb017a83f30..ace5fb01d9a0a 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -951,6 +951,7 @@ _err_defer: static void soc_cleanup_component(struct snd_soc_component *component) { + snd_soc_component_set_jack(component, NULL, NULL); list_del(&component->card_list); snd_soc_dapm_free(snd_soc_component_get_dapm(component)); soc_cleanup_component_debugfs(component); -- 2.30.2