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-04-20 127/127] sound/soc/amd/acp/acp-legacy-mach.c:149:74: warning: variable 'ret' is uninitialized when used here
Date: Tue, 21 Apr 2026 22:25:52 +0800 [thread overview]
Message-ID: <202604212200.YzzHzpbL-lkp@intel.com> (raw)
tree: https://github.com/morimoto/linux sound-cleanup-2026-04-20
head: c0eca3aad838fa892c00ca5d3141b136aac51b91
commit: ed950a3f7a9bf4445c6ea314b6e0a5f0733f6505 [127/127] ASoC: amd: acp-legacy-mach: use snd_soc_card_register()
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20260421/202604212200.YzzHzpbL-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260421/202604212200.YzzHzpbL-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/202604212200.YzzHzpbL-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> sound/soc/amd/acp/acp-legacy-mach.c:149:74: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
149 | dev_err(dev, "devm_snd_soc_card_register(%s) failed: %d\n", card_name, ret);
| ^~~
include/linux/dev_printk.h:154:65: note: expanded from macro 'dev_err'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
sound/soc/amd/acp/acp-legacy-mach.c:135:9: note: initialize the variable 'ret' to silence this warning
135 | int ret;
| ^
| = 0
1 warning generated.
vim +/ret +149 sound/soc/amd/acp/acp-legacy-mach.c
126
127 static int acp_asoc_probe(struct platform_device *pdev)
128 {
129 struct snd_soc_card *card = NULL;
130 struct device *dev = &pdev->dev;
131 struct snd_soc_acpi_mach *mach = dev_get_platdata(&pdev->dev);
132 const struct dmi_system_id *dmi_id;
133 struct acp_card_drvdata *acp_card_drvdata;
134 const char *card_name;
135 int ret;
136
137 if (!pdev->id_entry) {
138 ret = -EINVAL;
139 goto out;
140 }
141
142 card_name = pdev->id_entry->name;
143
144 acp_card_drvdata = (struct acp_card_drvdata *)pdev->id_entry->driver_data;
145 acp_card_drvdata->acpi_mach = (struct snd_soc_acpi_mach *)pdev->dev.platform_data;
146
147 card = devm_snd_soc_card_alloc(dev, THIS_MODULE, &acp_card_driver, card_name, NULL, NULL);
148 if (!card) {
> 149 dev_err(dev, "devm_snd_soc_card_register(%s) failed: %d\n", card_name, ret);
150 goto out;
151 }
152 snd_soc_card_attach_priv(card, acp_card_drvdata);
153
154 acp_asoc_init_ops(acp_card_drvdata);
155
156 /* If widgets and controls are not set in specific callback,
157 * they will be added per-codec in acp-mach-common.c
158 */
159 ret = acp_ops_configure_widgets(card);
160 if (ret < 0) {
161 dev_err(&pdev->dev,
162 "Cannot configure widgets for card (%s): %d\n",
163 card->name, ret);
164 goto out;
165 }
166
167 ret = acp_ops_probe(card);
168 if (ret < 0) {
169 dev_err(&pdev->dev,
170 "Cannot probe card (%s): %d\n",
171 card->name, ret);
172 goto out;
173 }
174 if (!strcmp(pdev->name, "acp-pdm-mach"))
175 acp_card_drvdata->acp_rev = *((int *)dev->platform_data);
176 else
177 acp_card_drvdata->acp_rev = mach->mach_params.subsystem_rev;
178
179 dmi_id = dmi_first_match(acp_quirk_table);
180 if (dmi_id && dmi_id->driver_data)
181 acp_card_drvdata->tdm_mode = dmi_id->driver_data;
182
183 ret = acp_legacy_dai_links_create(card);
184 if (ret) {
185 dev_err(&pdev->dev,
186 "Cannot create dai links for card (%s): %d\n",
187 card->name, ret);
188 goto out;
189 }
190
191 ret = devm_snd_soc_card_register(card);
192 if (ret) {
193 dev_err(&pdev->dev,
194 "devm_snd_soc_register_card(%s) failed: %d\n",
195 card->name, ret);
196 goto out;
197 }
198 out:
199 return ret;
200 }
201
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-04-21 14:26 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=202604212200.YzzHzpbL-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