浏览代码

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>
Lars-Peter Clausen 9 年之前
父节点
当前提交
50dc60a255
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      drivers/dma/dma-axi-dmac.c

+ 3 - 1
drivers/dma/dma-axi-dmac.c

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