Commit a8763f33 authored by Wolfram Sang's avatar Wolfram Sang

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: default avatarWolfram Sang <wsa@the-dreams.de>
parent 61f4d6b4
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment