mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-01 10:13:58 +08:00
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@kaiser.cx> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
parent
40af583d16
commit
5df324b5f4
@ -778,7 +778,7 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
|
|||||||
init_completion(&i2c->msg_complete);
|
init_completion(&i2c->msg_complete);
|
||||||
|
|
||||||
i2c->irq = ret = platform_get_irq(pdev, 0);
|
i2c->irq = ret = platform_get_irq(pdev, 0);
|
||||||
if (ret <= 0)
|
if (ret < 0)
|
||||||
goto err_clk;
|
goto err_clk;
|
||||||
|
|
||||||
ret = devm_request_irq(&pdev->dev, i2c->irq, exynos5_i2c_irq,
|
ret = devm_request_irq(&pdev->dev, i2c->irq, exynos5_i2c_irq,
|
||||||
|
Loading…
Reference in New Issue
Block a user