From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Syed Saba Kareem <Syed.SabaKareem@amd.com>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>
Subject: sound/soc/amd/acp/acp70.c:217 acp70_pcm_resume() error: we previously assumed 'stream' could be null (see line 218)
Date: Thu, 5 Dec 2024 16:34:52 +0300 [thread overview]
Message-ID: <2c6a1bd0-7651-4c72-bca4-34674aabafe3@stanley.mountain> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: feffde684ac29a3b7aec82d2df850fbdbdee55e4
commit: d3534684ada99ef8c0899eb28c62b4462483ee19 ASoC: amd: acp: add Kconfig options for acp7.0 based platform driver
config: x86_64-randconfig-161-20241205 (https://download.01.org/0day-ci/archive/20241205/202412052149.HYbkQDxc-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202412052149.HYbkQDxc-lkp@intel.com/
smatch warnings:
sound/soc/amd/acp/acp70.c:217 acp70_pcm_resume() error: we previously assumed 'stream' could be null (see line 218)
vim +/stream +217 sound/soc/amd/acp/acp70.c
e84db124cb2158b Syed Saba Kareem 2023-10-21 208 static int __maybe_unused acp70_pcm_resume(struct device *dev)
e84db124cb2158b Syed Saba Kareem 2023-10-21 209 {
e84db124cb2158b Syed Saba Kareem 2023-10-21 210 struct acp_dev_data *adata = dev_get_drvdata(dev);
e84db124cb2158b Syed Saba Kareem 2023-10-21 211 struct acp_stream *stream;
e84db124cb2158b Syed Saba Kareem 2023-10-21 212 struct snd_pcm_substream *substream;
e84db124cb2158b Syed Saba Kareem 2023-10-21 213 snd_pcm_uframes_t buf_in_frames;
e84db124cb2158b Syed Saba Kareem 2023-10-21 214 u64 buf_size;
e84db124cb2158b Syed Saba Kareem 2023-10-21 215
e84db124cb2158b Syed Saba Kareem 2023-10-21 216 spin_lock(&adata->acp_lock);
e84db124cb2158b Syed Saba Kareem 2023-10-21 @217 list_for_each_entry(stream, &adata->stream_list, list) {
e84db124cb2158b Syed Saba Kareem 2023-10-21 @218 if (stream) {
The list iterator can't be NULL so this check isn't required.
e84db124cb2158b Syed Saba Kareem 2023-10-21 219 substream = stream->substream;
e84db124cb2158b Syed Saba Kareem 2023-10-21 220 if (substream && substream->runtime) {
e84db124cb2158b Syed Saba Kareem 2023-10-21 221 buf_in_frames = (substream->runtime->buffer_size);
e84db124cb2158b Syed Saba Kareem 2023-10-21 222 buf_size = frames_to_bytes(substream->runtime, buf_in_frames);
e84db124cb2158b Syed Saba Kareem 2023-10-21 223 config_pte_for_stream(adata, stream);
e84db124cb2158b Syed Saba Kareem 2023-10-21 224 config_acp_dma(adata, stream, buf_size);
e84db124cb2158b Syed Saba Kareem 2023-10-21 225 if (stream->dai_id)
e84db124cb2158b Syed Saba Kareem 2023-10-21 226 restore_acp_i2s_params(substream, adata, stream);
e84db124cb2158b Syed Saba Kareem 2023-10-21 227 else
e84db124cb2158b Syed Saba Kareem 2023-10-21 228 restore_acp_pdm_params(substream, adata);
e84db124cb2158b Syed Saba Kareem 2023-10-21 229 }
e84db124cb2158b Syed Saba Kareem 2023-10-21 230 }
e84db124cb2158b Syed Saba Kareem 2023-10-21 231 }
e84db124cb2158b Syed Saba Kareem 2023-10-21 232 spin_unlock(&adata->acp_lock);
e84db124cb2158b Syed Saba Kareem 2023-10-21 233 return 0;
e84db124cb2158b Syed Saba Kareem 2023-10-21 234 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-12-05 13:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=2c6a1bd0-7651-4c72-bca4-34674aabafe3@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=Syed.SabaKareem@amd.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
/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
all inboxes | Powered by JetHome®