From: Amadeusz Sławiński Date: Fri, 15 Oct 2021 16:12:52 +0000 (+0200) Subject: ASoC: core: Remove invalid snd_soc_component_set_jack call X-Git-Tag: v6.1-rc5~2159^2~59^2~33^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7db53c21b1c3c25676d1125049bc92c756421cd6;p=platform%2Fkernel%2Flinux-starfive.git ASoC: core: Remove invalid snd_soc_component_set_jack call If snd_soc_component_set_jack() is called after snd_soc_component_remove() it may operate on memory which is freed in ->remove handler. Signed-off-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20211015161257.27052-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 94f1548..dcf6be4 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1342,9 +1342,6 @@ static void soc_remove_component(struct snd_soc_component *component, if (probed) snd_soc_component_remove(component); - /* For framework level robustness */ - snd_soc_component_set_jack(component, NULL, NULL); - list_del_init(&component->card_list); snd_soc_dapm_free(snd_soc_component_get_dapm(component)); soc_cleanup_component_debugfs(component);