Re: [PATCH v5 4/8] iio: light: ltr501: Power down chip if request irq fails
Jonathan Cameron <[email protected]>
| Newsgroups | gmane.linux.kernel.stable,gmane.linux.kernel.iio,gmane.linux.drivers.devicetree,gmane.linux.kernel |
|---|---|
| Message-ID | <20260823003809.25a19c2d@jic23-huawei> |
On Mon, 17 Aug 2026 19:08:53 +0200 Esben Haabendal <[email protected]> wrote: > 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: [email protected] > Acked-by: Kuppuswamy Sathyanarayanan <[email protected]> > Reviewed-by: Andy Shevchenko <[email protected]> > Signed-off-by: Esben Haabendal <[email protected]> > --- > 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 7d045be78c6d..7746d374688f 100644 > --- a/drivers/iio/light/ltr501.c > +++ b/drivers/iio/light/ltr501.c > @@ -1540,7 +1540,7 @@ static int ltr501_probe(struct i2c_client *client) > if (ret) { > dev_err(&client->dev, "request irq (%d) failed\n", > client->irq); Some noise on this one because the above print is gone in the iio tree. Anyhow, I think I didn't mess up the conflict resolution but please check! Next patch also goes away for same reason Jonathan > - return ret; > + goto powerdown_on_error; > } > } else { > indio_dev->info = data->chip_info->info_no_irq; >