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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202107290246.hNQDlfoB-lkp@intel.com>
Date:   Wed, 28 Jul 2021 22:16:32 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     kbuild@...ts.01.org, lakshmi.sowjanya.d@...el.com,
        linus.walleij@...aro.org
Cc:     lkp@...el.com, kbuild-all@...ts.01.org, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org, andriy.shevchenko@...ux.intel.com,
        lakshmi.bai.raja.subramanian@...el.com, tamal.saha@...el.com,
        lakshmi.sowjanya.d@...el.com
Subject: [kbuild] Re: [PATCH v3 2/2] pinctrl: Add Intel Keem Bay pinctrl
 driver

Hi,

url:    https://github.com/0day-ci/linux/commits/lakshmi-sowjanya-d-intel-com/Add-pinctrl-support-for-Intel-Keem-Bay-SoC/20210718-112204 
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git  devel
config: arm64-randconfig-m031-20210728 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 10.3.0

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

smatch warnings:
drivers/pinctrl/pinctrl-keembay.c:1147 keembay_pinconf_set() error: uninitialized symbol 'ret'.

vim +/ret +1147 drivers/pinctrl/pinctrl-keembay.c

57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1097  static int keembay_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1098  			       unsigned long *cfg, unsigned int num_configs)
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1099  {
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1100  	struct keembay_pinctrl *kpc = pinctrl_dev_get_drvdata(pctldev);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1101  	enum pin_config_param param;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1102  	unsigned int arg, i;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1103  	int ret;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1104  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1105  	if (pin >= kpc->npins)
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1106  		return -EINVAL;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1107  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1108  	for (i = 0; i < num_configs; i++) {
                                                                    ^^^^^^^^^^^^^^^^
Probably num_configs can't be zero, but that's what the check is
complaining about.

57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1109  		param = pinconf_to_config_param(cfg[i]);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1110  		arg = pinconf_to_config_argument(cfg[i]);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1111  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1112  		switch (param) {
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1113  		case PIN_CONFIG_BIAS_DISABLE:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1114  			ret = keembay_pinconf_set_pull(kpc, pin, KEEMBAY_GPIO_DISABLE);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1115  			break;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1116  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1117  		case PIN_CONFIG_BIAS_PULL_UP:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1118  			ret = keembay_pinconf_set_pull(kpc, pin, KEEMBAY_GPIO_PULL_UP);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1119  			break;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1120  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1121  		case PIN_CONFIG_BIAS_PULL_DOWN:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1122  			ret = keembay_pinconf_set_pull(kpc, pin, KEEMBAY_GPIO_PULL_DOWN);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1123  			break;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1124  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1125  		case PIN_CONFIG_BIAS_BUS_HOLD:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1126  			ret = keembay_pinconf_set_pull(kpc, pin, KEEMBAY_GPIO_BUS_HOLD);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1127  			break;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1128  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1129  		case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1130  			ret = keembay_pinconf_set_schmitt(kpc, pin, arg);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1131  			break;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1132  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1133  		case PIN_CONFIG_SLEW_RATE:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1134  			ret = keembay_pinconf_set_slew_rate(kpc, pin, arg);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1135  			break;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1136  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1137  		case PIN_CONFIG_DRIVE_STRENGTH:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1138  			ret = keembay_pinconf_set_drive(kpc, pin, arg);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1139  			break;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1140  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1141  		default:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1142  			return -EINVAL;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1143  		}
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1144  		if (ret)
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1145  			return ret;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1146  	}
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16 @1147  	return ret;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1148  }

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

_______________________________________________
kbuild mailing list -- kbuild@...ts.01.org
To unsubscribe send an email to kbuild-leave@...ts.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ