From a8763f33c55b74c26e4532e1893d2dcf6d038abe Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Thu, 12 Dec 2013 22:51:31 +0100 Subject: [PATCH] i2c: imx: propagate irq error code in probe smatch rightfully says: drivers/i2c/busses/i2c-imx.c:610 i2c_imx_probe() info: why not propagate 'irq' from platform_get_irq() instead of (-2)? Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index d0cfbb4cb964..db895fb22e65 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -607,7 +607,7 @@ static int i2c_imx_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq < 0) { dev_err(&pdev->dev, "can't get irq number\n"); - return -ENOENT; + return irq; } res = platform_get_resource(pdev, IORESOURCE_MEM, 0);