From: mnlife qiao <mnlife.qiao@gmail.com>
To: lgirdwood@gmail.com, Jaroslav Kysela <perex@perex.cz>,
open list <linux-kernel@vger.kernel.org>,
alsa-devel@alsa-project.org, broonie@kernel.org,
mnlife qiao <mnlife.qiao@gmail.com>, mnlife <mnlife@foxmail.com>
Subject: [PATCH] ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access
Date: Wed, 15 Jul 2020 08:24:04 +0800 [thread overview]
Message-ID: <CAGjHXR2ExzMO3ntwzZy9QUhpuqe-VZAXOucNkXXZK+0XZcaQWQ@mail.gmail.com> (raw)
In-Reply-To: <5f0e49da.1c69fb81.1ede7.a8fbSMTPIN_ADDED_MISSING@mx.google.com>
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);
--
2.17.1
next parent reply other threads:[~2020-07-16 7:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5f0e49da.1c69fb81.1ede7.a8fbSMTPIN_ADDED_MISSING@mx.google.com>
2020-07-15 0:24 ` mnlife qiao [this message]
2020-07-16 22:29 ` [PATCH] ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access Mark Brown
2020-07-18 14:56 mnlife
[not found] <tencent_2D17145034BA02B43C169473C02C4257AF06@qq.com>
2020-07-19 2:52 ` mnlife qiao
-- strict thread matches above, loose matches on Subject: below --
2020-07-19 3:08 mnlife qiao
2023-08-11 14:25 mnlife
2023-08-15 18:09 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGjHXR2ExzMO3ntwzZy9QUhpuqe-VZAXOucNkXXZK+0XZcaQWQ@mail.gmail.com \
--to=mnlife.qiao@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mnlife@foxmail.com \
--cc=perex@perex.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).