]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: light: tsl2591: return actual error from probe IRQ failure
authorStepan Ionichev <sozdayvek@gmail.com>
Mon, 18 May 2026 09:43:11 +0000 (14:43 +0500)
committerJonathan Cameron <jic23@kernel.org>
Sat, 4 Jul 2026 23:02:10 +0000 (00:02 +0100)
When devm_request_threaded_irq() fails, probe logs the error and
then returns -EINVAL, dropping the real error code and breaking the
deferred-probe flow for -EPROBE_DEFER.

Return ret directly; the IRQ subsystem already prints on failure.

Fixes: 2335f0d7c790 ("iio: light: Added AMS tsl2591 driver implementation")
Cc: stable@vger.kernel.org
Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/light/tsl2591.c

index f3ffa9721ad57b073036e8d2e4e51d28a43a1ba7..ef3ed9635a1ef8ee716208b4481339fb5353a4a4 100644 (file)
@@ -1070,10 +1070,8 @@ static int tsl2591_probe(struct i2c_client *client)
                                                NULL, tsl2591_event_handler,
                                                IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
                                                "tsl2591_irq", indio_dev);
-               if (ret) {
-                       dev_err_probe(&client->dev, ret, "IRQ request error\n");
-                       return -EINVAL;
-               }
+               if (ret)
+                       return ret;
                indio_dev->info = &tsl2591_info;
        } else {
                indio_dev->info = &tsl2591_info_no_irq;