projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
273bc8b
)
ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access
author
mnlife
<mnlife@126.com>
Fri, 11 Aug 2023 14:25:11 +0000
(22:25 +0800)
committer
Mark Brown
<broonie@kernel.org>
Mon, 14 Aug 2023 21:10:35 +0000
(22:10 +0100)
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>
sound/soc/soc-jack.c
patch
|
blob
|
history
diff --git
a/sound/soc/soc-jack.c
b/sound/soc/soc-jack.c
index f951acb2ce362a82ccaf4b247909cadce3194183..b2cc13b9c77b78b08b5a1f63a4cb25441b4a5edf 100644
(file)
--- 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);