diff options
author | mnlife <mnlife@126.com> | 2023-08-11 16:25:11 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-08-14 23:10:35 +0200 |
commit | 62cc82e6486b9b66b340bbf5fb38b0171fb56a7f (patch) | |
tree | 42f300e1642bdc39f40b66d0cdb69a6fb52cdbd9 | |
parent | ASoC: Intel: Add rpl_nau8318_8825 driver (diff) | |
download | linux-62cc82e6486b9b66b340bbf5fb38b0171fb56a7f.tar.xz linux-62cc82e6486b9b66b340bbf5fb38b0171fb56a7f.zip |
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>
-rw-r--r-- | sound/soc/soc-jack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index f951acb2ce36..b2cc13b9c77b 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c @@ -37,7 +37,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) struct snd_soc_jack_pin *pin; unsigned int sync = 0; - if (!jack) + if (!jack || !jack->jack) return; trace_snd_soc_jack_report(jack, mask, status); |