drm/fsl-dcu: Propagate the real error code
authorFabio Estevam <fabio.estevam@nxp.com>
Wed, 16 Nov 2016 15:38:33 +0000 (13:38 -0200)
committerStefan Agner <stefan@agner.ch>
Tue, 29 Nov 2016 01:23:49 +0000 (17:23 -0800)
In case of platform_get_irq() failure, let's propagate the real
error code, instead of a 'fake' one.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c

index 2ecbb4942b80d72ce8615aaa164128ef28799847..f242e64c76ca3a266c7eb1a3c9f51604c4274c10 100644 (file)
@@ -346,7 +346,7 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev)
        fsl_dev->irq = platform_get_irq(pdev, 0);
        if (fsl_dev->irq < 0) {
                dev_err(dev, "failed to get irq\n");
-               return -ENXIO;
+               return fsl_dev->irq;
        }
 
        fsl_dev->regmap = devm_regmap_init_mmio(dev, base,