[morimoto:sound-cleanup-2026-07-17-2 301/301] sound/soc/codecs/wm_adsp_fw_find_test.c:280:48: warning: variable 'test_dev' is uninitialized when used here
kernel test robot <[email protected]> Sun, 19 Jul 2026 02:01:50 +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-17-2 head: 0031be0dff2c86cbb204c3d1bb5ee9797cb9cb53 commit: 9c663d9f6ce80b79e42d5b9ae67b3f980bfceaa0 [301/301] ASoC: add test-hack method config: i386-randconfig-007-20260718 (https://download.01.org/0day-ci/archive/20260719/[email protected]/config) compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260719/[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/codecs/wm_adsp_fw_find_test.c:280:48: warning: variable 'test_dev' is uninitialized when used here [-Wuninitialized] 280 | priv->dsp.component = snd_soc_component_alloc(test_dev); | ^~~~~~~~ sound/soc/codecs/wm_adsp_fw_find_test.c:272:25: note: initialize the variable 'test_dev' to silence this warning 272 | struct device *test_dev; | ^ | = NULL 1 warning generated. vim +/test_dev +280 sound/soc/codecs/wm_adsp_fw_find_test.c 268 269 static int wm_adsp_fw_find_test_case_init(struct kunit *test) 270 { 271 struct wm_adsp_fw_find_test *priv; 272 struct device *test_dev; 273 int ret; 274 275 priv = kunit_kzalloc(test, sizeof(*priv), GFP_KERNEL); 276 if (!priv) 277 return -ENOMEM; 278 279 /* Require dummy struct snd_soc_component for the alsa name prefix string */ > 280 priv->dsp.component = snd_soc_component_alloc(test_dev); 281 if (!priv->dsp.component) 282 return -ENOMEM; 283 284 test->priv = priv; 285 286 /* Create dummy amp device */ 287 test_dev = kunit_device_register(test, "wm_adsp_test_drv"); 288 if (IS_ERR(test_dev)) 289 return PTR_ERR(test_dev); 290 291 priv->dsp.cs_dsp.dev = get_device(test_dev); 292 if (!priv->dsp.cs_dsp.dev) 293 return -ENODEV; 294 295 ret = kunit_add_action_or_reset(test, _put_device_wrapper, priv->dsp.cs_dsp.dev); 296 if (ret) 297 return ret; 298 299 return 0; 300 } 301 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki