diff options
author | Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> | 2022-07-07 15:57:00 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-07-11 16:59:09 +0300 |
commit | af3b33b9707d453a12e0cf5ac35d7b97b3524ace (patch) | |
tree | 59311dca85a292b069678ed0d05581bb0a36f40e /sound/soc/codecs/rt298.c | |
parent | c1d7ebda11aae4659b665af61d7277dd351659b9 (diff) | |
download | linux-af3b33b9707d453a12e0cf5ac35d7b97b3524ace.tar.xz |
ASoC: codecs: rt298: Set component to NULL on remove
Make sure that component is set to proper value, otherwise we may
dereference freed component in interrupt.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220707125701.3518263-5-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt298.c')
-rw-r--r-- | sound/soc/codecs/rt298.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c index e1d94f128fd9..b0b53d4f07df 100644 --- a/sound/soc/codecs/rt298.c +++ b/sound/soc/codecs/rt298.c @@ -1022,6 +1022,7 @@ static void rt298_remove(struct snd_soc_component *component) struct rt298_priv *rt298 = snd_soc_component_get_drvdata(component); cancel_delayed_work_sync(&rt298->jack_detect_work); + rt298->component = NULL; } #ifdef CONFIG_PM |