From: Fabio Estevam Date: Fri, 3 Oct 2014 01:25:22 +0000 (-0300) Subject: iio: adc: vf610: Propagate the real error when platform_get_irq() fails X-Git-Tag: v5.15~16669^2~446^2~18 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=8552befa3086589876032d5e1ce5797ae2bb684b;p=mirror_ubuntu-kernels.git 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: Fabio Estevam Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c index d47fff003b78..8ec353c01d98 100644 --- a/drivers/iio/adc/vf610_adc.c +++ b/drivers/iio/adc/vf610_adc.c @@ -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,