Re: [PATCH v3 4/6] iio: light: ltr501: Power down chip if request irq fails

From: Andy Shevchenko

Date: Thu Aug 06 2026 - 17:38:03 EST


On Tue, Aug 04, 2026 at 07:02:15PM +0200, Esben Haabendal 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.
>
> The dev_err() message was causing duplicated error messages, as
> devm_request_threaded_irq() calls dev_err_probe() on failure.

> Fixes: 7ac702b3144b ("iio: ltr501: Add interrupt support")

Be careful with this. The removing of the error message should either go
separately, or you should be assured that the IRQ core prints it for you
in all stable kernels where this goes to be backported.

> Signed-off-by: Esben Haabendal <esben@xxxxxxxxxx>

--
With Best Regards,
Andy Shevchenko