Re: [PATCH] iio: accel: fxls8962af: Initialize return value
From: Sean Nyekjaer
Date: Fri Jul 09 2021 - 02:48:52 EST
Hi Souptick and Fabio.
On Fri, Jul 09, 2021 at 12:36:25AM -0300, Fabio Estevam wrote:
> Hi Souptick,
>
> On Fri, Jul 9, 2021 at 12:17 AM Souptick Joarder <jrdr.linux@xxxxxxxxx> wrote:
> >
> > 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@xxxxxxxxx>
> > Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> > Signed-off-by: Souptick Joarder <jrdr.linux@xxxxxxxxx>
Missing fixes-tag ;)
[ ... ]
>
> Would the change below work?
>
> --- a/drivers/iio/accel/fxls8962af-core.c
> +++ b/drivers/iio/accel/fxls8962af-core.c
> @@ -637,7 +637,7 @@ static int fxls8962af_i2c_raw_read_errata3(struct
> fxls8962af_data *data,
> return ret;
> }
>
> - return ret;
> + return 0;
> }
I have already submitted a patch for this :)
https://patchwork.kernel.org/project/linux-iio/patch/20210623113115.581609-1-sean@xxxxxxxxxx/
/Sean