[PATCH] 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@foxmail.com>
--- sound/soc/soc-jack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 0f1820f36b4d..51b799ee98b7 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c @@ -44,7 +44,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) unsigned int sync = 0; int enable; -if (!jack) +if (!jack || !jack->jack) return; trace_snd_soc_jack_report(jack, mask, status);
On Tue, Jul 14, 2020 at 10:30:36PM +0800, xingxing qiao wrote:
unsigned int sync = 0; int enable; -if (!jack)
This is actually worse than your previous posting - it's got HTML all through it :( git send-email is typically the easiest way to send things.
Also please note my comment about needing a subject line in a similar style to those in existing commits you can see in git.
participants (2)
-
Mark Brown
-
xingxing qiao