[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210512144838.674734708@linuxfoundation.org>
Date: Wed, 12 May 2021 16:41:30 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, kernel test robot <lkp@...el.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Stable@...r.kernel.org,
Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: [PATCH 5.12 044/677] iio: magnetometer: yas530: Fix return value on error path
From: Linus Walleij <linus.walleij@...aro.org>
commit e64837bf9e2c063d6b5bab51c0554a60270f636d upstream.
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@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Suggested-by: Andy Shevchenko <andy.shevchenko@...il.com>
Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
Link: https://lore.kernel.org/r/20210215153023.47899-1-linus.walleij@linaro.org
Cc: <Stable@...r.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/iio/magnetometer/yamaha-yas530.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/iio/magnetometer/yamaha-yas530.c
+++ b/drivers/iio/magnetometer/yamaha-yas530.c
@@ -888,6 +888,7 @@ static int yas5xx_probe(struct i2c_clien
strncpy(yas5xx->name, "yas532", sizeof(yas5xx->name));
break;
default:
+ ret = -ENODEV;
dev_err(dev, "unhandled device ID %02x\n", yas5xx->devid);
goto assert_reset;
}
Powered by blists - more mailing lists