summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-10-02 22:25:22 -0300
committerJonathan Cameron <jic23@kernel.org>2014-10-22 20:28:11 +0100
commit8552befa3086589876032d5e1ce5797ae2bb684b (patch)
treeba668f905c05e8cbf11d482e66d1ac86fe4cdf85 /drivers/iio
parentb12206e917ac34bec41b9ff93d37d8bd53a2b3bc (diff)
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 <fabio.estevam@freescale.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/adc/vf610_adc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c
index d47fff003b7..8ec353c01d9 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,