From: Dan Carpenter <error27@gmail.com>
To: oe-kbuild@lists.linux.dev,
Angel Iglesias <ang.iglesiasg@gmail.com>,
linux-iio@vger.kernel.org
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
Angel Iglesias <ang.iglesiasg@gmail.com>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Nikita Yushchenko <nikita.yoush@cogentembedded.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Paul Cercueil <paul@crapouillou.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] iio: pressure: bmp280: Add support for new sensor BMP580
Date: Thu, 29 Dec 2022 12:20:44 +0300 [thread overview]
Message-ID: <202212260352.XQTIlVGl-lkp@intel.com> (raw)
In-Reply-To: <5a1c9341102fdce2f49d151f0cba76f1ba9ba279.1671986815.git.ang.iglesiasg@gmail.com>
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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.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, ®);
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, ®);
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
next prev parent reply other threads:[~2022-12-29 9:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-25 16:55 [PATCH 0/5] Add support for pressure sensor Bosch BMP580 Angel Iglesias
2022-12-25 16:56 ` [PATCH 1/5] iio: pressure: bmp280: Add enumeration to handle chip variants Angel Iglesias
2022-12-27 21:36 ` Andy Shevchenko
2022-12-25 16:57 ` [PATCH 2/5] iio: pressure: bmp280: Add preinit callback Angel Iglesias
2022-12-25 16:58 ` [PATCH 3/5] iio: pressure: bmp280: Add support for new sensor BMP580 Angel Iglesias
2022-12-29 9:20 ` Dan Carpenter [this message]
2022-12-25 16:59 ` [PATCH 4/5] dt-bindings: iio: pressure: bmp085: Add BMP580 compatible string Angel Iglesias
2022-12-26 12:05 ` Krzysztof Kozlowski
2022-12-26 12:43 ` Angel Iglesias
2022-12-25 17:00 ` [PATCH 5/5] iio: pressure: bmp280: Add nvmem operations for BMP580 Angel Iglesias
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=202212260352.XQTIlVGl-lkp@intel.com \
--to=error27@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ang.iglesiasg@gmail.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=nikita.yoush@cogentembedded.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=paul@crapouillou.net \
--cc=rafael.j.wysocki@intel.com \
--cc=ulf.hansson@linaro.org \
/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