dmaengine: imx-sdma: Return a proper error code in platform_get_irq()
There is no need to return a 'fake' value upon platform_get_irq() failure.
Just propagate the real error instead.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 125c326..fc874e5 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1483,7 +1483,7 @@
irq = platform_get_irq(pdev, 0);
if (irq < 0)
- return -EINVAL;
+ return irq;
iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
sdma->regs = devm_ioremap_resource(&pdev->dev, iores);