From: Souptick Joarder <jrdr.linux@gmail.com>
To: jic23@kernel.org, lars@metafoo.de, sean@geanix.com,
andriy.shevchenko@linux.intel.com, linus.walleij@linaro.org
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Souptick Joarder <jrdr.linux@gmail.com>,
kernel test robot <lkp@intel.com>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: [PATCH] iio: accel: fxls8962af: Initialize return value
Date: Fri, 9 Jul 2021 08:45:25 +0530 [thread overview]
Message-ID: <20210709031526.30746-1-jrdr.linux@gmail.com> (raw)
kernel test robot throws below warning ->
smatch warnings:
drivers/iio/accel/fxls8962af-core.c:640
fxls8962af_i2c_raw_read_errata3() error: uninitialized symbol 'ret'.
Initialize it.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
drivers/iio/accel/fxls8962af-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c
index 078d87865fde..8af1c8f58e83 100644
--- a/drivers/iio/accel/fxls8962af-core.c
+++ b/drivers/iio/accel/fxls8962af-core.c
@@ -628,7 +628,7 @@ static int fxls8962af_i2c_raw_read_errata3(struct fxls8962af_data *data,
u16 *buffer, int samples,
int sample_length)
{
- int i, ret;
+ int i, ret = -EINVAL;
for (i = 0; i < samples; i++) {
ret = regmap_raw_read(data->regmap, FXLS8962AF_BUF_X_LSB,
--
2.25.1
next reply other threads:[~2021-07-09 3:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-09 3:15 Souptick Joarder [this message]
2021-07-09 3:36 ` [PATCH] iio: accel: fxls8962af: Initialize return value Fabio Estevam
2021-07-09 6:48 ` Sean Nyekjaer
2021-07-10 17:16 ` Fabio Estevam
[not found] ` <CAFqt6zZ3WOv6sv5iVgkbYBhnxvv=t1pE8ZxEiC7=j5qugvy=NA@mail.gmail.com>
2021-07-09 14:35 ` Sean Nyekjaer
2021-07-09 17:12 ` Dan Carpenter
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=20210709031526.30746-1-jrdr.linux@gmail.com \
--to=jrdr.linux@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dan.carpenter@oracle.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=sean@geanix.com \
/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;
as well as URLs for NNTP newsgroup(s).