From: Arnd Bergmann Date: Fri, 2 Sep 2016 23:17:20 +0000 (+0200) Subject: dmaengine: sirf: fix irq number error check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=524c6e04f826cea8a34a27136d8f5925df9213ed;p=linux.git 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 Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c index d8bc3f2a71db1..f5abe29e748f5 100644 --- a/drivers/dma/sirf-dma.c +++ b/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; }