提交 d632f340 编写于 作者: S Sergey Shtylyov 提交者: Zheng Zengkai

i2c: synquacer: fix deferred probing

stable inclusion
from stable-5.10.65
commit 5c68b7795b4c7bdbd54148c9343b5a5edeb476d7
bugzilla: 182361 https://gitee.com/openeuler/kernel/issues/I4EH3U

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5c68b7795b4c7bdbd54148c9343b5a5edeb476d7

--------------------------------

[ Upstream commit 8d744da2 ]

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: 0d676a6c ("i2c: add support for Socionext SynQuacer I2C controller")
Signed-off-by: NSergey Shtylyov <s.shtylyov@omprussia.ru>
Acked-by: NArd Biesheuvel <ardb@kernel.org>
Signed-off-by: NWolfram Sang <wsa@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 7cecc154
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册