提交 8552befa 编写于 作者: F Fabio Estevam 提交者: Jonathan Cameron

iio: adc: vf610: Propagate the real error when platform_get_irq() fails

There is no need to pass a 'fake' return value when platform_get_irq() fails.

Propagate the real error instead.

While at it, only consider negative numbers returned by platform_get_irq()
as error.
Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 b12206e9
......@@ -593,9 +593,9 @@ static int vf610_adc_probe(struct platform_device *pdev)
return PTR_ERR(info->regs);
irq = platform_get_irq(pdev, 0);
if (irq <= 0) {
if (irq < 0) {
dev_err(&pdev->dev, "no irq resource?\n");
return -EINVAL;
return irq;
}
ret = devm_request_irq(info->dev, irq,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部