public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
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/soc-component.c:1712:18: warning: variable 'card' is uninitialized when used here
Date: Tue, 21 Apr 2026 08:02:26 +0800	[thread overview]
Message-ID: <202604210755.vDZ5fdMu-lkp@intel.com> (raw)

tree:   https://github.com/morimoto/linux sound-cleanup-2026-04-20
head:   c0eca3aad838fa892c00ca5d3141b136aac51b91
commit: bfa0d5aadb75033c0a6038d125e5e98d4d6311eb [127/127] ASoC: soc-component: move snd_soc_register_[un]component() to soc-component.c
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20260421/202604210755.vDZ5fdMu-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260421/202604210755.vDZ5fdMu-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/202604210755.vDZ5fdMu-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> sound/soc/soc-component.c:1712:18: warning: variable 'card' is uninitialized when used here [-Wuninitialized]
    1712 |         soc_card_rebind(card);
         |                         ^~~~
   sound/soc/soc-component.c:1684:27: note: initialize the variable 'card' to silence this warning
    1684 |         struct snd_soc_card *card;
         |                                  ^
         |                                   = NULL
   1 warning generated.


vim +/card +1712 sound/soc/soc-component.c

  1679	
  1680	int snd_soc_component_add(struct snd_soc_component *component,
  1681				  struct snd_soc_dai_driver *dai_drv,
  1682				  int num_dai)
  1683	{
  1684		struct snd_soc_card *card;
  1685		int ret;
  1686		int i;
  1687		guard(mutex)(&client_mutex);
  1688	
  1689		if (component->driver->endianness) {
  1690			for (i = 0; i < num_dai; i++) {
  1691				convert_endianness_formats(&dai_drv[i].playback);
  1692				convert_endianness_formats(&dai_drv[i].capture);
  1693			}
  1694		}
  1695	
  1696		ret = soc_component_register_dais(component, dai_drv, num_dai);
  1697		if (ret < 0) {
  1698			dev_err(component->dev, "ASoC: Failed to register DAIs: %d\n",
  1699				ret);
  1700			goto err_cleanup;
  1701		}
  1702	
  1703		if (!component->driver->write && !component->driver->read) {
  1704			if (!component->regmap)
  1705				component->regmap = dev_get_regmap(component->dev,
  1706								   NULL);
  1707		}
  1708	
  1709		/* see for_each_component */
  1710		list_add(&component->list, soc_component_get_list_head());
  1711	
> 1712		soc_card_rebind(card);
  1713	
  1714	err_cleanup:
  1715		if (ret < 0)
  1716			snd_soc_component_del(component);
  1717	
  1718		return ret;
  1719	}
  1720	EXPORT_SYMBOL_GPL(snd_soc_component_add);
  1721	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-04-21  0:03 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=202604210755.vDZ5fdMu-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