Unverified Commit b9f098aa authored by Amadeusz Sławiński's avatar Amadeusz Sławiński Committed by Mark Brown
Browse files

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: default avatarAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220707125701.3518263-6-amadeuszx.slawinski@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent af3b33b9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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