* Re: [PATCH] ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access [not found] ` <CAGjHXR2ExzMO3ntwzZy9QUhpuqe-VZAXOucNkXXZK+0XZcaQWQ@mail.gmail.com> @ 2020-07-16 22:29 ` Mark Brown 0 siblings, 0 replies; 2+ messages in thread From: Mark Brown @ 2020-07-16 22:29 UTC (permalink / raw) To: mnlife qiao; +Cc: lgirdwood, Jaroslav Kysela, open list, alsa-devel, mnlife [-- Attachment #1: Type: text/plain, Size: 654 bytes --] On Wed, Jul 15, 2020 at 08:24:04AM +0800, mnlife qiao wrote: > When snd_soc_card_jack_new is not called or the call fails, > calling this function causes a null pointer access > --- 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; I'm afraid this still won't apply - there's a text/html version of the patch, in the text portion tabs have been converted into spaces and it appears some other issues that mean git am can't understand it. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <tencent_2D17145034BA02B43C169473C02C4257AF06@qq.com>]
* [PATCH] ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access [not found] <tencent_2D17145034BA02B43C169473C02C4257AF06@qq.com> @ 2020-07-19 2:52 ` mnlife qiao 0 siblings, 0 replies; 2+ messages in thread From: mnlife qiao @ 2020-07-19 2:52 UTC (permalink / raw) To: lgirdwood, Jaroslav Kysela, open list, alsa-devel, mnlife, mnlife qiao > From: mnlife <mnlife@foxmail.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 > > ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-19 2:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <5f0e49da.1c69fb81.1ede7.a8fbSMTPIN_ADDED_MISSING@mx.google.com>
[not found] ` <CAGjHXR2ExzMO3ntwzZy9QUhpuqe-VZAXOucNkXXZK+0XZcaQWQ@mail.gmail.com>
2020-07-16 22:29 ` [PATCH] ASoC: soc-jack: calling snd_soc_jack_report causes a null pointer access Mark Brown
[not found] <tencent_2D17145034BA02B43C169473C02C4257AF06@qq.com>
2020-07-19 2:52 ` mnlife qiao
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®