Browse Source

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>
Fabio Estevam 11 years ago
parent
commit
8552befa30
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/iio/adc/vf610_adc.c

+ 2 - 2
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,