diff mbox

dmaengine: sirf: fix irq number error check

Message ID 20160902231737.1721916-1-arnd@arndb.de
State Accepted
Commit 524c6e04f826cea8a34a27136d8f5925df9213ed
Headers show

Commit Message

Arnd Bergmann Sept. 2, 2016, 11:17 p.m. UTC
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>

---
 drivers/dma/sirf-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.0
diff mbox

Patch

diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c
index a96e4a480de5..8f62edad51be 100644
--- a/drivers/dma/sirf-dma.c
+++ b/drivers/dma/sirf-dma.c
@@ -866,7 +866,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;
 	}