[media] rcar-vin: return correct error from platform_get_irq()
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Mon, 15 Aug 2016 15:06:30 +0000 (12:06 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 23 Aug 2016 17:46:16 +0000 (14:46 -0300)
Fix a error from the original driver where the wrong error code is
returned if the driver fails to get a IRQ number from
platform_get_irq().

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/rcar-vin/rcar-core.c

index a1eb26b2eea0747527a1786790655430176a3b25..3941134862913abfc3bc9a2f23a0f354388dc14a 100644 (file)
@@ -282,8 +282,8 @@ static int rcar_vin_probe(struct platform_device *pdev)
                return PTR_ERR(vin->base);
 
        irq = platform_get_irq(pdev, 0);
-       if (irq <= 0)
-               return ret;
+       if (irq < 0)
+               return irq;
 
        ret = rvin_dma_probe(vin, irq);
        if (ret)