Skip to content

Commit 4337683

Browse files
root3315gregkh
authored andcommitted
iio: light: tsl2591: return actual error from probe IRQ failure
commit a00ffd1 upstream. 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: 2335f0d ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1401178 commit 4337683

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/iio/light/tsl2591.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,10 +1139,8 @@ static int tsl2591_probe(struct i2c_client *client)
11391139
NULL, tsl2591_event_handler,
11401140
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
11411141
"tsl2591_irq", indio_dev);
1142-
if (ret) {
1143-
dev_err_probe(&client->dev, ret, "IRQ request error\n");
1144-
return -EINVAL;
1145-
}
1142+
if (ret)
1143+
return ret;
11461144
indio_dev->info = &tsl2591_info;
11471145
} else {
11481146
indio_dev->info = &tsl2591_info_no_irq;

0 commit comments

Comments
 (0)