[morimoto:sound-cleanup-2026-07-22 300/300] sound/soc/meson/meson-card-utils.c:314:41: warning: variable 'card_driver' is uninitialized when used here
kernel test robot <[email protected]> Thu, 23 Jul 2026 13:48:30 +0800
| Newsgroups | dev.linux.lists.llvm,dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://github.com/morimoto/linux sound-cleanup-2026-07-22 head: 992d9ac1367e6b746cfabe31cf72ef690769afc8 commit: 8384b5464d5fc3809a6548bda73e1690bc5dea3a [300/300] ASoC: meson: meson-card-utils: use snd_soc_card_register() config: arm-randconfig-004-20260722 (https://download.01.org/0day-ci/archive/20260723/[email protected]/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 5c0dfced1adc55429e32b1db08570abd3a219d85) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260723/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All warnings (new ones prefixed by >>): >> sound/soc/meson/meson-card-utils.c:314:41: warning: variable 'card_driver' is uninitialized when used here [-Wuninitialized] 314 | ret = devm_snd_soc_card_register(card, card_driver); | ^~~~~~~~~~~ sound/soc/meson/meson-card-utils.c:266:41: note: initialize the variable 'card_driver' to silence this warning 266 | struct snd_soc_card_driver *card_driver; | ^ | = NULL 1 warning generated. vim +/card_driver +314 sound/soc/meson/meson-card-utils.c 260 261 int meson_card_probe(struct platform_device *pdev) 262 { 263 const struct meson_card_match_data *data; 264 struct device *dev = &pdev->dev; 265 struct snd_soc_card *card; 266 struct snd_soc_card_driver *card_driver; 267 struct meson_card *priv; 268 int ret; 269 270 data = of_device_get_match_data(dev); 271 if (!data) { 272 dev_err(dev, "failed to match device\n"); 273 return -ENODEV; 274 } 275 276 card = snd_soc_card_alloc(dev); 277 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 278 if (!card || !priv) 279 return -ENOMEM; 280 281 snd_soc_card_set_priv(card, priv); 282 283 priv->card_driver.owner = THIS_MODULE; 284 priv->card_driver.driver_name = dev->driver->name; 285 priv->match_data = data; 286 priv->dev = dev; 287 288 ret = snd_soc_of_parse_card_name(card, "model"); 289 if (ret < 0) 290 return ret; 291 292 ret = meson_card_parse_of_optional(priv, "audio-routing", 293 snd_soc_card_driver_of_parse_audio_routing); 294 if (ret) { 295 dev_err(dev, "error while parsing routing\n"); 296 return ret; 297 } 298 299 ret = meson_card_parse_of_optional(priv, "audio-widgets", 300 snd_soc_card_driver_of_parse_simple_widgets); 301 if (ret) { 302 dev_err(dev, "error while parsing widgets\n"); 303 return ret; 304 } 305 306 ret = meson_card_add_links(priv); 307 if (ret) 308 goto out_err; 309 310 ret = snd_soc_card_driver_of_parse_aux_devs(dev, &priv->card_driver, "audio-aux-devs"); 311 if (ret) 312 goto out_err; 313 > 314 ret = devm_snd_soc_card_register(card, card_driver); 315 if (ret) 316 goto out_err; 317 318 return 0; 319 320 out_err: 321 meson_card_clean_references(priv); 322 return ret; 323 } 324 EXPORT_SYMBOL_GPL(meson_card_probe); 325 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki