Re: [PATCH 1/2] iio: magnetometer: yas530: Fix return value on errorpath

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 15 Feb 2021 16:30:23 +0100
Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:

> There was a missed return variable assignment in the
> default errorpath of the switch statement in yas5xx_probe().
> Fix it.
> 
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Suggested-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
Hi Linus,

A bit of bad timing on these.  I'm running behind on pull requests for
my fixes-togreg branch so it doesn't yet have the driver.

Hence I'll pick these up in a couple of weeks once that's rebased after
I send Greg a pull request.

Give me a poke if I seem to have forgotten them.

Thanks,

Jonathan

> ---
>  drivers/iio/magnetometer/yamaha-yas530.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iio/magnetometer/yamaha-yas530.c b/drivers/iio/magnetometer/yamaha-yas530.c
> index d46f23d82b3d..cee6207d8847 100644
> --- a/drivers/iio/magnetometer/yamaha-yas530.c
> +++ b/drivers/iio/magnetometer/yamaha-yas530.c
> @@ -887,6 +887,7 @@ static int yas5xx_probe(struct i2c_client *i2c,
>  		strncpy(yas5xx->name, "yas532", sizeof(yas5xx->name));
>  		break;
>  	default:
> +		ret = -ENODEV;
>  		dev_err(dev, "unhandled device ID %02x\n", yas5xx->devid);
>  		goto assert_reset;
>  	}




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux