diff mbox series

[v2,2/2] i2c: synquacer: fix deferred probing

Message ID 1ab424b2-95b8-76ab-9d18-9362d1595887@omp.ru
State New
Headers show
Series None | expand

Commit Message

Sergey Shtylyov Aug. 12, 2021, 8:39 p.m. UTC
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>

---
 drivers/i2c/busses/i2c-synquacer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ard Biesheuvel Aug. 16, 2021, 9:29 a.m. UTC | #1
On Thu, 12 Aug 2021 at 22:39, Sergey Shtylyov <s.shtylyov@omp.ru> wrote:
>

> 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>


>

> ---

>  drivers/i2c/busses/i2c-synquacer.c |    2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> Index: linux/drivers/i2c/busses/i2c-synquacer.c

> ===================================================================

> --- linux.orig/drivers/i2c/busses/i2c-synquacer.c

> +++ linux/drivers/i2c/busses/i2c-synquacer.c

> @@ -578,7 +578,7 @@ static int synquacer_i2c_probe(struct pl

>

>         i2c->irq = platform_get_irq(pdev, 0);

>         if (i2c->irq < 0)

> -               return -ENODEV;

> +               return i2c->irq;

>

>         ret = devm_request_irq(&pdev->dev, i2c->irq, synquacer_i2c_isr,

>                                0, dev_name(&pdev->dev), i2c);
Wolfram Sang Aug. 17, 2021, 7:42 p.m. UTC | #2
On Thu, Aug 12, 2021 at 11:39:11PM +0300, Sergey Shtylyov wrote:
> 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>

> 


Applied to for-next, thanks!
diff mbox series

Patch

Index: linux/drivers/i2c/busses/i2c-synquacer.c
===================================================================
--- linux.orig/drivers/i2c/busses/i2c-synquacer.c
+++ linux/drivers/i2c/busses/i2c-synquacer.c
@@ -578,7 +578,7 @@  static int synquacer_i2c_probe(struct pl
 
 	i2c->irq = platform_get_irq(pdev, 0);
 	if (i2c->irq < 0)
-		return -ENODEV;
+		return i2c->irq;
 
 	ret = devm_request_irq(&pdev->dev, i2c->irq, synquacer_i2c_isr,
 			       0, dev_name(&pdev->dev), i2c);