[PATCH 1/6] ASoC: core: Remove invalid snd_soc_component_set_jack call
Cezary Rojewski
cezary.rojewski at intel.com
Fri Oct 15 18:12:52 CEST 2021
From: Amadeusz Sławiński <amadeuszx.slawinski at linux.intel.com>
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 <amadeuszx.slawinski at linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski at intel.com>
---
sound/soc/soc-core.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 121a12244f08..7eaa8fc81d31 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1363,9 +1363,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);
--
2.25.1
More information about the Alsa-devel
mailing list