提交 a8763f33 编写于 作者: W 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: NWolfram Sang <wsa@the-dreams.de>
上级 61f4d6b4
...@@ -607,7 +607,7 @@ static int i2c_imx_probe(struct platform_device *pdev) ...@@ -607,7 +607,7 @@ static int i2c_imx_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) { if (irq < 0) {
dev_err(&pdev->dev, "can't get irq number\n"); dev_err(&pdev->dev, "can't get irq number\n");
return -ENOENT; return irq;
} }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册