Re: [PATCH] iio: light: tsl2591: return actual error from probe IRQ failure

From: Andy Shevchenko

Date: Mon May 18 2026 - 03:43:19 EST


On Sun, May 17, 2026 at 11:10:42PM +0500, Stepan Ionichev wrote:
> When devm_request_threaded_irq() fails, probe calls dev_err_probe()
> but then returns -EINVAL, dropping the real error code and breaking
> the deferred-probe flow that dev_err_probe() handles for -EPROBE_DEFER.
>
> Return the value from dev_err_probe() instead.

...

> - if (ret) {
> - dev_err_probe(&client->dev, ret, "IRQ request error\n");
> - return -EINVAL;
> - }
> + if (ret)
> + return dev_err_probe(&client->dev, ret, "IRQ request error\n");

Also remove dup message, at the end it should be

if (ret)
return ret;

--
With Best Regards,
Andy Shevchenko