Commit 8f157d4f authored by Pawel Harlozinski's avatar Pawel Harlozinski Committed by Mark Brown

ASoC: Jack: Fix NULL pointer dereference in snd_soc_jack_report

Check for existance of jack before tracing.
NULL pointer dereference has been reported by KASAN while unloading
machine driver (snd_soc_cnl_rt274).
Signed-off-by: default avatarPawel Harlozinski <pawel.harlozinski@linux.intel.com>
Link: https://lore.kernel.org/r/20191112130237.10141-1-pawel.harlozinski@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
parent 130d3e90
......@@ -82,10 +82,9 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
unsigned int sync = 0;
int enable;
trace_snd_soc_jack_report(jack, mask, status);
if (!jack)
return;
trace_snd_soc_jack_report(jack, mask, status);
dapm = &jack->card->dapm;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment