iio:adc:berlin2-adc: pass up real error code
authorHartmut Knaack <knaack.h@gmx.de>
Mon, 27 Jul 2015 22:38:58 +0000 (00:38 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 2 Aug 2015 18:05:51 +0000 (19:05 +0100)
Pass up the real error code returned by platform_get_irq_byname().

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/berlin2-adc.c

index aecc9ad995ada4809ef928651c1622f9fed6316f..30e2090df96d7d81a4a61a9f460e24f851a60993 100644 (file)
@@ -301,11 +301,11 @@ static int berlin2_adc_probe(struct platform_device *pdev)
 
        irq = platform_get_irq_byname(pdev, "adc");
        if (irq < 0)
-               return -ENODEV;
+               return irq;
 
        tsen_irq = platform_get_irq_byname(pdev, "tsen");
        if (tsen_irq < 0)
-               return -ENODEV;
+               return tsen_irq;
 
        ret = devm_request_irq(&pdev->dev, irq, berlin2_adc_irq, 0,
                        pdev->dev.driver->name, indio_dev);