Bladeren bron

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 9 jaren geleden
bovenliggende
commit
524c6e04f8
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  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);
-	if (sdma->irq == NO_IRQ) {
+	if (!sdma->irq) {
 		dev_err(dev, "Error mapping IRQ!\n");
 		return -EINVAL;
 	}