Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] iio: light: tsl2591: return actual error from probe IRQ failure
@ 2026-05-17 18:10 Stepan Ionichev
  2026-05-17 18:25 ` Joshua Crofts
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Stepan Ionichev @ 2026-05-17 18:10 UTC (permalink / raw)
  To: jic23
  Cc: dlechner, nuno.sa, andy, hcazarim, gregkh, linux-iio,
	linux-kernel, sozdayvek

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.

Fixes: 2335f0d7c790 ("iio: light: Added AMS tsl2591 driver implementation")
Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
---
 drivers/iio/light/tsl2591.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/light/tsl2591.c b/drivers/iio/light/tsl2591.c
index c5557867e..4b0a2a302 100644
--- a/drivers/iio/light/tsl2591.c
+++ b/drivers/iio/light/tsl2591.c
@@ -1137,10 +1137,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 dev_err_probe(&client->dev, ret, "IRQ request error\n");
 		indio_dev->info = &tsl2591_info;
 	} else {
 		indio_dev->info = &tsl2591_info_no_irq;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-07-03 19:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-17 18:10 [PATCH] iio: light: tsl2591: return actual error from probe IRQ failure Stepan Ionichev
2026-05-17 18:25 ` Joshua Crofts
2026-05-18  7:37 ` Andy Shevchenko
2026-05-18  9:43 ` [PATCH v2] " Stepan Ionichev
2026-05-18 15:40   ` Jonathan Cameron
2026-05-18 15:43     ` Jonathan Cameron
2026-06-03 17:23       ` Jonathan Cameron
2026-06-04  7:25         ` Andy Shevchenko
2026-06-04  7:26           ` Andy Shevchenko
2026-07-03 19:10             ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox