lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 20 Jan 2022 02:18:26 +0800
From:   kernel test robot <lkp@...el.com>
To:     Joerg Schambacher <joerg@...iberry.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, 0day robot <lkp@...el.com>
Subject: sound/soc/codecs/tas5754m.c:246:7: warning: variable 'ret' is used
 uninitialized whenever switch case is taken

tree:   https://github.com/0day-ci/linux/commits/UPDATE-20220119-210919/Joerg-Schambacher/ASoC-adds-component-driver-for-TAS575xM-digital-amplifiers/20220110-164852
head:   05b8bf5544bc621031f5a0a6bdf1ac6468a7367b
commit: 05b8bf5544bc621031f5a0a6bdf1ac6468a7367b ASoC: adds component driver for TAS575xM digital amplifiers
date:   5 hours ago
config: riscv-randconfig-c006-20220118 (https://download.01.org/0day-ci/archive/20220120/202201200259.nNgbKOJd-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f7b7138a62648f4019c55e4671682af1f851f295)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/0day-ci/linux/commit/05b8bf5544bc621031f5a0a6bdf1ac6468a7367b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review UPDATE-20220119-210919/Joerg-Schambacher/ASoC-adds-component-driver-for-TAS575xM-digital-amplifiers/20220110-164852
        git checkout 05b8bf5544bc621031f5a0a6bdf1ac6468a7367b
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash sound/soc/codecs/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> sound/soc/codecs/tas5754m.c:246:7: warning: variable 'ret' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
           case SND_SOC_BIAS_ON:
                ^~~~~~~~~~~~~~~
   sound/soc/codecs/tas5754m.c:267:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   sound/soc/codecs/tas5754m.c:247:7: warning: variable 'ret' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
           case SND_SOC_BIAS_PREPARE:
                ^~~~~~~~~~~~~~~~~~~~
   sound/soc/codecs/tas5754m.c:267:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   sound/soc/codecs/tas5754m.c:242:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   2 warnings generated.


vim +/ret +246 sound/soc/codecs/tas5754m.c

   236	
   237	static int tas5754m_set_bias_level(struct snd_soc_component *component,
   238					   enum snd_soc_bias_level level)
   239	{
   240		struct tas5754m_priv *tas5754m =
   241					snd_soc_component_get_drvdata(component);
   242		int ret;
   243	
   244		switch (level) {
   245		default:
 > 246		case SND_SOC_BIAS_ON:
   247		case SND_SOC_BIAS_PREPARE:
   248			break;
   249	
   250		case SND_SOC_BIAS_STANDBY:
   251			ret = regmap_update_bits(tas5754m->regmap,
   252					TAS5754M_POWER, TAS5754M_RQST, 0);
   253			if (ret)
   254				dev_err(component->dev,
   255					"Failed to remove standby: %d\n", ret);
   256			break;
   257	
   258		case SND_SOC_BIAS_OFF:
   259			ret = regmap_update_bits(tas5754m->regmap,
   260					TAS5754M_POWER, TAS5754M_RQST, TAS5754M_RQST);
   261			if (ret)
   262				dev_err(component->dev,
   263					"Failed to request standby: %d\n", ret);
   264			break;
   265		}
   266	
   267		return ret;
   268	}
   269	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ