Blob Blame History Raw
From: Sergey Shtylyov <s.shtylyov@omp.ru>
Date: Thu, 12 Aug 2021 23:39:11 +0300
Subject: i2c: synquacer: fix deferred probing

Git-commit: 8d744da241b81f4211f4813b0d3c1981326fa9ca
Patch-mainline: v5.15-rc1
References: git-fixes

The driver overrides the error codes returned by platform_get_irq() to
-ENODEV, so if it returns -EPROBE_DEFER, the driver will fail the probe
permanently instead of the deferred probing. Switch to propagating the
error codes upstream.

Fixes: 0d676a6c4390 ("i2c: add support for Socionext SynQuacer I2C controller")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omprussia.ru>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
---
 drivers/i2c/busses/i2c-synquacer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/i2c/busses/i2c-synquacer.c
+++ b/drivers/i2c/busses/i2c-synquacer.c
@@ -582,7 +582,7 @@ static int synquacer_i2c_probe(struct pl
 	i2c->irq = platform_get_irq(pdev, 0);
 	if (i2c->irq < 0) {
 		dev_err(&pdev->dev, "no IRQ resource found\n");
-		return -ENODEV;
+		return i2c->irq;
 	}
 
 	ret = devm_request_irq(&pdev->dev, i2c->irq, synquacer_i2c_isr,