From: Ammar Faizi <[email protected]>
To: Dan Carpenter <[email protected]>,
[email protected], Daniel Baluta <[email protected]>
Cc: [email protected], [email protected],
GNU/Weeb Mailing List <[email protected]>,
[email protected], Mark Brown <[email protected]>
Subject: Re: [ammarfaizi2-block:broonie/sound/for-5.18 33/171] sound/soc/sof/compress.c:54 snd_sof_compr_fragment_elapsed() warn: variable dereferenced before check 'cstream' (see line 48)
Date: Sat, 12 Mar 2022 05:41:42 +0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 3/12/22 1:59 AM, Dan Carpenter wrote:
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <[email protected]>
> Reported-by: Dan Carpenter <[email protected]>
>
> New smatch warnings:
> sound/soc/sof/compress.c:54 snd_sof_compr_fragment_elapsed() warn: variable dereferenced before check 'cstream' (see line 48)
>
> vim +/cstream +54 sound/soc/sof/compress.c
>
> 858f7a5c45cacb Daniel Baluta 2021-10-04 46 void snd_sof_compr_fragment_elapsed(struct snd_compr_stream *cstream)
> 858f7a5c45cacb Daniel Baluta 2021-10-04 47 {
> 6324cf901e14c6 Daniel Baluta 2022-01-20 @48 struct snd_soc_pcm_runtime *rtd = cstream->private_data;
> ^^^^^^^^^^^^^^^^^^^^^^
> 6324cf901e14c6 Daniel Baluta 2022-01-20 49 struct snd_compr_runtime *crtd = cstream->runtime;
> ^^^^^^^^^^^^^^^^^
> Dereference
>
> 858f7a5c45cacb Daniel Baluta 2021-10-04 50 struct snd_soc_component *component;
> 6324cf901e14c6 Daniel Baluta 2022-01-20 51 struct snd_compr_tstamp *tstamp;
> 858f7a5c45cacb Daniel Baluta 2021-10-04 52 struct snd_sof_pcm *spcm;
> 858f7a5c45cacb Daniel Baluta 2021-10-04 53
> 858f7a5c45cacb Daniel Baluta 2021-10-04 @54 if (!cstream)
> ^^^^^^^^
> Checked too late
Hi Dan,
Thanks for reporting, it has already been fixed in commit
7e4bfcf10a03981 ("ASoC: SOF: compress: fix null check after dereference")
Link: https://git.kernel.org/broonie/sound/c/7e4bfcf10a03981
Regards,
--
Ammar Faizi
prev parent reply other threads:[~2022-03-11 22:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-11 18:59 [ammarfaizi2-block:broonie/sound/for-5.18 33/171] sound/soc/sof/compress.c:54 snd_sof_compr_fragment_elapsed() warn: variable dereferenced before check 'cstream' (see line 48) Dan Carpenter
2022-03-11 22:41 ` Ammar Faizi [this message]
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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