1
0
Fork 0

dmaengine: axi-dmac: Propagate errors from platform_get_irq()

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>
hifive-unleashed-5.1
Lars-Peter Clausen 2016-07-01 17:45:57 +02:00 committed by Vinod Koul
parent 9bcfe38f58
commit 50dc60a255
1 changed files with 3 additions and 1 deletions

View 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);