Use of_irq_get which returns a negative error code on failure instead of silently returning 0. Update the IRQ validation checks in fsldma_request_irqs from !chan->irq to chan->irq <= 0 to handle both 0 and negative error returns correctly.
Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev <[email protected]> --- drivers/dma/fsldma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 0d73ce3dbfe6..79a268139b9f 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c @@ -1067,7 +1067,7 @@ static int fsldma_request_irqs(struct fsldma_device *fdev) if (!chan) continue; - if (!chan->irq) { + if (chan->irq <= 0) { chan_err(chan, "interrupts property missing in device tree\n"); ret = -ENODEV; goto out_unwind; @@ -1090,7 +1090,7 @@ static int fsldma_request_irqs(struct fsldma_device *fdev) if (!chan) continue; - if (!chan->irq) + if (chan->irq <= 0) continue; free_irq(chan->irq, chan); @@ -1180,7 +1180,7 @@ static int fsl_dma_chan_probe(struct fsldma_device *fdev, dma_cookie_init(&chan->common); /* find the IRQ line, if it exists in the device tree */ - chan->irq = irq_of_parse_and_map(node, 0); + chan->irq = of_irq_get(node, 0); /* Add the channel to DMA device channel list */ list_add_tail(&chan->common.device_node, &fdev->common.channels); -- 2.54.0
