aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmadeusz Sławiński <[email protected]>2022-07-07 14:57:01 +0200
committerMark Brown <[email protected]>2022-07-11 14:59:10 +0100
commitb9f098aa7ae2a022dee06a8ca363e3e0e077f05a (patch)
tree9014a26e8eccf3a92f426a4f4995e27a9cd4d7a5
parentaf3b33b9707d453a12e0cf5ac35d7b97b3524ace (diff)
ASoC: codecs: rt274: 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 <[email protected]> Reviewed-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/codecs/rt274.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt274.c b/sound/soc/codecs/rt274.c
index 6b208f9eb503..f2c50b11e4d0 100644
--- a/sound/soc/codecs/rt274.c
+++ b/sound/soc/codecs/rt274.c
@@ -993,6 +993,7 @@ static void rt274_remove(struct snd_soc_component *component)
struct rt274_priv *rt274 = snd_soc_component_get_drvdata(component);
cancel_delayed_work_sync(&rt274->jack_detect_work);
+ rt274->component = NULL;
}
#ifdef CONFIG_PM