Skip to content

Commit

Permalink
i2c: synquacer: fix deferred probing
Browse files Browse the repository at this point in the history
[ Upstream commit 8d744da ]

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: 0d676a6 ("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: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Sergey Shtylyov authored and gregkh committed Sep 15, 2021
1 parent f577e9f commit 5c68b77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-synquacer.c
Expand Up @@ -578,7 +578,7 @@ static int synquacer_i2c_probe(struct platform_device *pdev)

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);
Expand Down

0 comments on commit 5c68b77

Please sign in to comment.