Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access

When snd_soc_card_jack_new is not called or the call fails,
calling this function causes a null pointer access

Signed-off-by: mnlife <mnlife@126.com>
Link: https://lore.kernel.org/r/20230811142511.6570-1-mnlife@126.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

mnlife and committed by
Mark Brown
62cc82e6 273bc8bf

+1 -1
+1 -1
sound/soc/soc-jack.c
··· 37 37 struct snd_soc_jack_pin *pin; 38 38 unsigned int sync = 0; 39 39 40 - if (!jack) 40 + if (!jack || !jack->jack) 41 41 return; 42 42 trace_snd_soc_jack_report(jack, mask, status); 43 43