提交 d6840a5e 编写于 作者: S Sergey Shtylyov 提交者: Wolfram Sang

i2c: s3c2410: fix IRQ check

Iff platform_get_irq() returns 0, the driver's probe() method will return 0
early (as if the method's call was successful).  Let's consider IRQ0 valid
for simplicity -- devm_request_irq() can always override that decision...

Fixes: e0d1ec97 ("i2c-s3c2410: Change IRQ to be plain integer.")
Signed-off-by: NSergey Shtylyov <s.shtylyov@omp.ru>
Reviewed-by: NKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: NWolfram Sang <wsa@kernel.org>
上级 a1299505
...@@ -1137,7 +1137,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) ...@@ -1137,7 +1137,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
*/ */
if (!(i2c->quirks & QUIRK_POLL)) { if (!(i2c->quirks & QUIRK_POLL)) {
i2c->irq = ret = platform_get_irq(pdev, 0); i2c->irq = ret = platform_get_irq(pdev, 0);
if (ret <= 0) { if (ret < 0) {
dev_err(&pdev->dev, "cannot find IRQ\n"); dev_err(&pdev->dev, "cannot find IRQ\n");
clk_unprepare(i2c->clk); clk_unprepare(i2c->clk);
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册