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] [day] [month] [year] [list]
Date:   Thu, 29 Dec 2022 12:20:44 +0300
From:   Dan Carpenter <error27@...il.com>
To:     oe-kbuild@...ts.linux.dev,
        Angel Iglesias <ang.iglesiasg@...il.com>,
        linux-iio@...r.kernel.org
Cc:     lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
        Angel Iglesias <ang.iglesiasg@...il.com>,
        Jonathan Cameron <jic23@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Nikita Yushchenko <nikita.yoush@...entembedded.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Paul Cercueil <paul@...pouillou.net>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/5] iio: pressure: bmp280: Add support for new sensor
 BMP580

Hi Angel,

url:    https://github.com/intel-lab-lkp/linux/commits/Angel-Iglesias/iio-pressure-bmp280-Add-enumeration-to-handle-chip-variants/20221226-010158
base:   e807541c2b273677e82ef50b5747ec7ae7d652b9
patch link:    https://lore.kernel.org/r/5a1c9341102fdce2f49d151f0cba76f1ba9ba279.1671986815.git.ang.iglesiasg%40gmail.com
patch subject: [PATCH 3/5] iio: pressure: bmp280: Add support for new sensor BMP580
config: i386-randconfig-m021-20221226
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Reported-by: Dan Carpenter <error27@...il.com>

smatch warnings:
drivers/iio/pressure/bmp280-core.c:1654 bmp580_preinit() warn: missing error code? 'ret'

vim +/ret +1654 drivers/iio/pressure/bmp280-core.c

ce037d81e52ecb Angel Iglesias 2022-12-25  1631  static int bmp580_preinit(struct bmp280_data *data)
ce037d81e52ecb Angel Iglesias 2022-12-25  1632  {
ce037d81e52ecb Angel Iglesias 2022-12-25  1633  	unsigned int reg;
ce037d81e52ecb Angel Iglesias 2022-12-25  1634  	int ret;
ce037d81e52ecb Angel Iglesias 2022-12-25  1635  
ce037d81e52ecb Angel Iglesias 2022-12-25  1636  	/* Issue soft-reset command */
ce037d81e52ecb Angel Iglesias 2022-12-25  1637  	ret = bmp580_cmd(data, BMP580_SOFT_RESET_CMD);
ce037d81e52ecb Angel Iglesias 2022-12-25  1638  	if (ret)
ce037d81e52ecb Angel Iglesias 2022-12-25  1639  		return ret;
ce037d81e52ecb Angel Iglesias 2022-12-25  1640  	/* Post powerup sequence */
ce037d81e52ecb Angel Iglesias 2022-12-25  1641  	ret = regmap_read(data->regmap, BMP580_REG_CHIP_ID, &reg);
ce037d81e52ecb Angel Iglesias 2022-12-25  1642  	if (ret)
ce037d81e52ecb Angel Iglesias 2022-12-25  1643  		return ret;
ce037d81e52ecb Angel Iglesias 2022-12-25  1644  	if (reg != BMP580_CHIP_ID) {
ce037d81e52ecb Angel Iglesias 2022-12-25  1645  		dev_err(data->dev, "preinit: unexpected chip_id\n");
ce037d81e52ecb Angel Iglesias 2022-12-25  1646  		return ret;
ce037d81e52ecb Angel Iglesias 2022-12-25  1647  	}
ce037d81e52ecb Angel Iglesias 2022-12-25  1648  	ret = regmap_read(data->regmap, BMP580_REG_STATUS, &reg);
ce037d81e52ecb Angel Iglesias 2022-12-25  1649  	if (ret)
ce037d81e52ecb Angel Iglesias 2022-12-25  1650  		return ret;
ce037d81e52ecb Angel Iglesias 2022-12-25  1651  	/* Check nvm status */
ce037d81e52ecb Angel Iglesias 2022-12-25  1652  	if (!(reg & BMP580_STATUS_NVM_RDY_MASK) || (reg & BMP580_STATUS_NVM_ERR_MASK)) {
ce037d81e52ecb Angel Iglesias 2022-12-25  1653  		dev_err(data->dev, "preinit: nvm error on powerup sequence\n");
ce037d81e52ecb Angel Iglesias 2022-12-25 @1654  		return ret;

"ret" is zero.  It should be return -EINVAL or something.

ce037d81e52ecb Angel Iglesias 2022-12-25  1655  	}
ce037d81e52ecb Angel Iglesias 2022-12-25  1656  
ce037d81e52ecb Angel Iglesias 2022-12-25  1657  	return 0;
ce037d81e52ecb Angel Iglesias 2022-12-25  1658  }

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ