[alsa-devel] [PATCH 2/2] ASoC: topology: Only free TLV for volume mixers of a widget

kbuild test robot lkp at intel.com
Fri Nov 25 10:46:20 CET 2016


Hi Mengdong,

[auto build test WARNING on asoc/for-next]
[also build test WARNING on v4.9-rc6 next-20161124]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/mengdong-lin-linux-intel-com/ASoC-topology-Allow-a-widget-to-have-multiple-enum-controls/20161125-164058
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: i386-randconfig-x011-201647 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   sound/soc/soc-topology.c: In function 'soc_tplg_dapm_widget_create':
>> sound/soc/soc-topology.c:1566:36: warning: 'kcontrol_type' may be used uninitialized in this function [-Wmaybe-uninitialized]
     widget->dobj.widget.kcontrol_type = kcontrol_type;
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~

vim +/kcontrol_type +1566 sound/soc/soc-topology.c

  1550			goto hdr_err;
  1551	
  1552		/* card dapm mutex is held by the core if we are loading topology
  1553		 * data during sound card init. */
  1554		if (card->instantiated)
  1555			widget = snd_soc_dapm_new_control(dapm, &template);
  1556		else
  1557			widget = snd_soc_dapm_new_control_unlocked(dapm, &template);
  1558		if (widget == NULL) {
  1559			dev_err(tplg->dev, "ASoC: failed to create widget %s controls\n",
  1560				w->name);
  1561			ret = -ENOMEM;
  1562			goto hdr_err;
  1563		}
  1564	
  1565		widget->dobj.type = SND_SOC_DOBJ_WIDGET;
> 1566		widget->dobj.widget.kcontrol_type = kcontrol_type;
  1567		widget->dobj.ops = tplg->ops;
  1568		widget->dobj.index = tplg->index;
  1569		kfree(template.sname);
  1570		kfree(template.name);
  1571		list_add(&widget->dobj.list, &tplg->comp->dobj_list);
  1572		return 0;
  1573	
  1574	hdr_err:

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 28963 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20161125/0caf8a46/attachment-0001.bin>


More information about the Alsa-devel mailing list