ASoC: core: Tell codec that jack is being removed
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Wed, 5 Jun 2019 13:45:53 +0000 (15:45 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 6 Jun 2019 16:39:56 +0000 (17:39 +0100)
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 <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c

index 7abb017..ace5fb0 100644 (file)
@@ -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);