Re: [PATCH v2 2/3] i2c: exynos5: fix platform_get_irq error handling

2020-11-02 Thread Krzysztof Kozlowski
On Sun, Nov 01, 2020 at 06:18:06PM +0100, Martin Kaiser wrote:
> If platform_get_irq returns an error, relay this error to the caller of
> the probe function. Don't change all errors to -EINVAL. This breaks the
> case where platform_get_irq returns -EPROBE_DEFER.
> 
> Signed-off-by: Martin Kaiser 
> ---
> changes in v2
> - split the patch in three parts
> 
>  drivers/i2c/busses/i2c-exynos5.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 

Reviewed-by: Krzysztof Kozlowski 

Best regards,
Krzysztof


[PATCH v2 2/3] i2c: exynos5: fix platform_get_irq error handling

2020-11-01 Thread Martin Kaiser
If platform_get_irq returns an error, relay this error to the caller of
the probe function. Don't change all errors to -EINVAL. This breaks the
case where platform_get_irq returns -EPROBE_DEFER.

Signed-off-by: Martin Kaiser 
---
changes in v2
- split the patch in three parts

 drivers/i2c/busses/i2c-exynos5.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index c5f5fb28762d..fad1c52857aa 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -778,10 +778,8 @@ 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) {
-   ret = -EINVAL;
+   if (ret <= 0)
goto err_clk;
-   }
 
ret = devm_request_irq(&pdev->dev, i2c->irq, exynos5_i2c_irq,
   IRQF_NO_SUSPEND, dev_name(&pdev->dev), i2c);
-- 
2.20.1