From: kernel test robot <lkp@intel.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [morimoto:sound-cleanup-2026-06-16 326/326] sound/soc/samsung/arndale.c:176:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false
Date: Wed, 17 Jun 2026 16:32:54 +0800 [thread overview]
Message-ID: <202606171609.mXRZth2s-lkp@intel.com> (raw)
tree: https://github.com/morimoto/linux sound-cleanup-2026-06-16
head: 5ce50ac7d0a59c6fb15e1baa7e6824ac096fe092
commit: c4ef8b77bf42812df873dc078097d5e8f196351e [326/326] ASoC: samsung: arndale: use snd_soc_card_register()
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20260617/202606171609.mXRZth2s-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project e19d1f51a2c80b63cd8ca95bcc757b7077112808)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260617/202606171609.mXRZth2s-lkp@intel.com/reproduce)
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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606171609.mXRZth2s-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> sound/soc/samsung/arndale.c:176:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
176 | if (!card)
| ^~~~~
sound/soc/samsung/arndale.c:179:6: note: uninitialized use occurs here
179 | if (ret) {
| ^~~
sound/soc/samsung/arndale.c:176:2: note: remove the 'if' if its condition is always true
176 | if (!card)
| ^~~~~~~~~~
177 | ret = -ENOMEM;
sound/soc/samsung/arndale.c:152:9: note: initialize the variable 'ret' to silence this warning
152 | int ret;
| ^
| = 0
1 warning generated.
vim +176 sound/soc/samsung/arndale.c
145
146 static int arndale_audio_probe(struct platform_device *pdev)
147 {
148 struct device_node *np = pdev->dev.of_node;
149 struct snd_soc_card *card;
150 struct snd_soc_card_driver *card_driver;
151 struct snd_soc_dai_link *dai_link;
152 int ret;
153
154 card_driver = (struct snd_soc_card_driver *)of_device_get_match_data(&pdev->dev);
155 dai_link = card_driver->dai_link;
156
157 dai_link->cpus->of_node = of_parse_phandle(np, "samsung,audio-cpu", 0);
158 if (!dai_link->cpus->of_node) {
159 dev_err(&pdev->dev,
160 "Property 'samsung,audio-cpu' missing or invalid\n");
161 return -EINVAL;
162 }
163
164 if (!dai_link->platforms->name)
165 dai_link->platforms->of_node = dai_link->cpus->of_node;
166
167 dai_link->codecs->of_node = of_parse_phandle(np, "samsung,audio-codec", 0);
168 if (!dai_link->codecs->of_node) {
169 dev_err(&pdev->dev,
170 "Property 'samsung,audio-codec' missing or invalid\n");
171 ret = -EINVAL;
172 goto err_put_of_nodes;
173 }
174
175 card = devm_snd_soc_card_register(&pdev->dev, card_driver);
> 176 if (!card)
177 ret = -ENOMEM;
178
179 if (ret) {
180 dev_err_probe(&pdev->dev, ret,
181 "snd_soc_card_register() failed\n");
182 goto err_put_of_nodes;
183 }
184 return 0;
185
186 err_put_of_nodes:
187 arndale_put_of_nodes(card_driver);
188 return ret;
189 }
190
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-06-17 8:33 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=202606171609.mXRZth2s-lkp@intel.com \
--to=lkp@intel.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@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