]> git.karo-electronics.de Git - linux-beck.git/commitdiff
dmaengine: axi-dmac: Propagate errors from platform_get_irq()
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 1 Jul 2016 15:45:57 +0000 (17:45 +0200)
committerVinod Koul <vinod.koul@intel.com>
Fri, 1 Jul 2016 17:26:41 +0000 (22:56 +0530)
Propagate errors returned by platform_get_irq() to the driver core. This
will enable proper probe deferring for the driver in case the IRQ provider
has not been registered yet.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/dma-axi-dmac.c

index 8b0de8cba7be941caffe71dd4f24410fd94decfa..0e0dfc0890ac2d507b3e76df8ec5d08a817bccd8 100644 (file)
@@ -579,7 +579,9 @@ static int axi_dmac_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        dmac->irq = platform_get_irq(pdev, 0);
-       if (dmac->irq <= 0)
+       if (dmac->irq < 0)
+               return dmac->irq;
+       if (dmac->irq == 0)
                return -EINVAL;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);