7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Esben Haabendal [ Upstream commit 8a9bcd587d7d768e6c8e9fff88bb89645e412731 ] In case devm_request_threaded_irq() failed, we were leaving the chip powered instead of powering it down again. Power down the chip switching ALS and PS modes to standby. Fixes: 7ac702b3144b ("iio: ltr501: Add interrupt support") Cc: stable@vger.kernel.org Acked-by: Kuppuswamy Sathyanarayanan Reviewed-by: Andy Shevchenko Signed-off-by: Esben Haabendal Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- drivers/iio/light/ltr501.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c index fa0d16890c8bf..b36bd10a02624 100644 --- a/drivers/iio/light/ltr501.c +++ b/drivers/iio/light/ltr501.c @@ -1538,7 +1538,7 @@ static int ltr501_probe(struct i2c_client *client) "ltr501_thresh_event", indio_dev); if (ret) - return ret; + goto powerdown_on_error; } else { indio_dev->info = data->chip_info->info_no_irq; } -- 2.53.0