* [kbuild] [linux-next:master 2280/12271] drivers/iio/accel/fxls8962af-core.c:640 fxls8962af_i2c_raw_read_errata3() error: uninitialized symbol 'ret'.
@ 2021-06-23 11:08 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2021-06-23 11:08 UTC (permalink / raw)
To: kbuild, Sean Nyekjaer
Cc: lkp, kbuild-all, Linux Memory Management List, Jonathan Cameron
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 4238b1710eadd18dd16de0288a2bc5bb84614b4e
commit: af959b7b96b87aee13ed5b0041fc14ca2e72cc84 [2280/12271] iio: accel: fxls8962af: fix errata bug E3 - I2C burst reads
config: powerpc64-randconfig-m031-20210622 (attached as .config)
compiler: powerpc64le-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/iio/accel/fxls8962af-core.c:640 fxls8962af_i2c_raw_read_errata3() error: uninitialized symbol 'ret'.
vim +/ret +640 drivers/iio/accel/fxls8962af-core.c
af959b7b96b87a Sean Nyekjaer 2021-05-06 627 static int fxls8962af_i2c_raw_read_errata3(struct fxls8962af_data *data,
af959b7b96b87a Sean Nyekjaer 2021-05-06 628 u16 *buffer, int samples,
af959b7b96b87a Sean Nyekjaer 2021-05-06 629 int sample_length)
af959b7b96b87a Sean Nyekjaer 2021-05-06 630 {
af959b7b96b87a Sean Nyekjaer 2021-05-06 631 int i, ret;
af959b7b96b87a Sean Nyekjaer 2021-05-06 632
af959b7b96b87a Sean Nyekjaer 2021-05-06 633 for (i = 0; i < samples; i++) {
af959b7b96b87a Sean Nyekjaer 2021-05-06 634 ret = regmap_raw_read(data->regmap, FXLS8962AF_BUF_X_LSB,
af959b7b96b87a Sean Nyekjaer 2021-05-06 635 &buffer[i * 3], sample_length);
af959b7b96b87a Sean Nyekjaer 2021-05-06 636 if (ret)
af959b7b96b87a Sean Nyekjaer 2021-05-06 637 return ret;
af959b7b96b87a Sean Nyekjaer 2021-05-06 638 }
af959b7b96b87a Sean Nyekjaer 2021-05-06 639
af959b7b96b87a Sean Nyekjaer 2021-05-06 @640 return ret;
Better to just "return 0;"
af959b7b96b87a Sean Nyekjaer 2021-05-06 641 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-23 11:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 11:08 [kbuild] [linux-next:master 2280/12271] drivers/iio/accel/fxls8962af-core.c:640 fxls8962af_i2c_raw_read_errata3() error: uninitialized symbol 'ret' Dan Carpenter
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).