Explorar o código

dmaengine: sirf: fix irq number error check

irq_of_parse_and_map() returns 0 on error, no NO_IRQ, so the
failure condition can never be met.

This changes the comparison to check for zero instead.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Arnd Bergmann %!s(int64=9) %!d(string=hai) anos
pai
achega
524c6e04f8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/dma/sirf-dma.c

+ 1 - 1
drivers/dma/sirf-dma.c

@@ -869,7 +869,7 @@ static int sirfsoc_dma_probe(struct platform_device *op)
 	}
 	}
 
 
 	sdma->irq = irq_of_parse_and_map(dn, 0);
 	sdma->irq = irq_of_parse_and_map(dn, 0);
-	if (sdma->irq == NO_IRQ) {
+	if (!sdma->irq) {
 		dev_err(dev, "Error mapping IRQ!\n");
 		dev_err(dev, "Error mapping IRQ!\n");
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}