i2c: exynos5: don't check for irq 0
authorMartin Kaiser <martin@kaiser.cx>
Sun, 1 Nov 2020 17:18:07 +0000 (18:18 +0100)
committerWolfram Sang <wsa@kernel.org>
Tue, 3 Nov 2020 21:18:04 +0000 (22:18 +0100)
platform_get_irq never returns 0. Don't check for this. Make it clear that
the error path always returns a negative error code.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-exynos5.c

index fad1c52857aa9c4309fff9a47c56a9678c3d7d71..20a9881a0d6cdb3b154f2c6468faf0c0c9d83b08 100644 (file)
@@ -778,7 +778,7 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
        init_completion(&i2c->msg_complete);
 
        i2c->irq = ret = platform_get_irq(pdev, 0);
-       if (ret <= 0)
+       if (ret < 0)
                goto err_clk;
 
        ret = devm_request_irq(&pdev->dev, i2c->irq, exynos5_i2c_irq,