summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt286.c
diff options
context:
space:
mode:
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>2022-07-07 14:56:59 +0200
committerMark Brown <broonie@kernel.org>2022-07-11 14:59:08 +0100
commitc1d7ebda11aae4659b665af61d7277dd351659b9 (patch)
tree85e19644cca31e80ed48b040c7eee62a1f819ceb /sound/soc/codecs/rt286.c
parentc0c5a242bba878b4d34f7c9612fd6cd6c404d414 (diff)
downloadlinux-c1d7ebda11aae4659b665af61d7277dd351659b9.tar.bz2
ASoC: codecs: rt286: 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-4-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt286.c')
-rw-r--r--sound/soc/codecs/rt286.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index b2b0b2b1e4d0..c4f7c4c2d793 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -960,6 +960,7 @@ static void rt286_remove(struct snd_soc_component *component)
struct rt286_priv *rt286 = snd_soc_component_get_drvdata(component);
cancel_delayed_work_sync(&rt286->jack_detect_work);
+ rt286->component = NULL;
}
#ifdef CONFIG_PM