dmaengine: sirf: fix irq number error check
authorArnd Bergmann <arnd@arndb.de>
Fri, 2 Sep 2016 23:17:20 +0000 (01:17 +0200)
committerVinod Koul <vinod.koul@intel.com>
Mon, 5 Sep 2016 11:10:52 +0000 (16:40 +0530)
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>
drivers/dma/sirf-dma.c

index d8bc3f2a71db1ad7dee743cd92999f970eb97832..f5abe29e748f588ce04de78a46b29362923d6d3d 100644 (file)
@@ -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;
        }