[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201101171807.8182-3-martin@kaiser.cx>
Date: Sun, 1 Nov 2020 18:18:07 +0100
From: Martin Kaiser <martin@...ser.cx>
To: Krzysztof Kozlowski <krzk@...nel.org>,
Wolfram Sang <wsa@...nel.org>,
Andrzej Hajda <a.hajda@...sung.com>
Cc: linux-i2c@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
linux-kernel@...r.kernel.org, Martin Kaiser <martin@...ser.cx>
Subject: [PATCH v2 3/3] i2c: exynos5: don't check for irq 0
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@...ser.cx>
---
changes in v2
- split the patch in three parts
drivers/i2c/busses/i2c-exynos5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index fad1c52857aa..20a9881a0d6c 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -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,
--
2.20.1
Powered by blists - more mailing lists