mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 07:03:28 -04:00
iio: light: tsl2591: return actual error from probe IRQ failure
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: 2335f0d7c7 ("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>
This commit is contained in:
committed by
Jonathan Cameron
parent
affe3f077d
commit
a00ffd1567
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user