Commit 41814c4e authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Vinod Koul

dmaengine: fsl-qdma: Handle invalid qdma-queue0 IRQ

platform_get_irq_byname() might return -errno which later would be cast
to an unsigned int and used in IRQ handling code leading to usage of
wrong ID and errors about wrong irq_base.
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: default avatarPeng Ma <peng.ma@nxp.com>
Tested-by: default avatarPeng Ma <peng.ma@nxp.com>
Link: https://lore.kernel.org/r/20191004150826.6656-1-krzk@kernel.orgSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 53596dfa
...@@ -1155,6 +1155,9 @@ static int fsl_qdma_probe(struct platform_device *pdev) ...@@ -1155,6 +1155,9 @@ static int fsl_qdma_probe(struct platform_device *pdev)
return ret; return ret;
fsl_qdma->irq_base = platform_get_irq_byname(pdev, "qdma-queue0"); fsl_qdma->irq_base = platform_get_irq_byname(pdev, "qdma-queue0");
if (fsl_qdma->irq_base < 0)
return fsl_qdma->irq_base;
fsl_qdma->feature = of_property_read_bool(np, "big-endian"); fsl_qdma->feature = of_property_read_bool(np, "big-endian");
INIT_LIST_HEAD(&fsl_qdma->dma_dev.channels); INIT_LIST_HEAD(&fsl_qdma->dma_dev.channels);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment