lkml.org 
[lkml]   [2014]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] dmaengine: imx-sdma: Return a proper error code in platform_get_irq()
Date
From: Fabio Estevam <fabio.estevam@freescale.com>

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>
---
drivers/dma/imx-sdma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 6ac61ba..18c0a13 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1483,7 +1483,7 @@ static int sdma_probe(struct platform_device *pdev)

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);
--
1.9.1


\
 
 \ /
  Last update: 2014-12-29 18:41    [W:0.046 / U:1.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site