summaryrefslogtreecommitdiffstats
path: root/drivers/dma/ti-dma-crossbar.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2015-07-10 22:13:19 +0800
committerVinod Koul <vinod.koul@intel.com>2015-08-05 10:40:06 +0530
commit28eb232f217583e7bece8e9d6b26cf55a694ceae (patch)
tree964b0adddfe4b8ab79d94d996a93e51118865b79 /drivers/dma/ti-dma-crossbar.c
parent1eb995bbf7a85e18f54fb162eade381320a3fcea (diff)
downloadblackbird-op-linux-28eb232f217583e7bece8e9d6b26cf55a694ceae.tar.gz
blackbird-op-linux-28eb232f217583e7bece8e9d6b26cf55a694ceae.zip
dmaengine: ti-dma-crossbar: Fix checking return value of devm_ioremap_resource
devm_ioremap_resource returns ERR_PTR on failure. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/ti-dma-crossbar.c')
-rw-r--r--drivers/dma/ti-dma-crossbar.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/dma/ti-dma-crossbar.c b/drivers/dma/ti-dma-crossbar.c
index 10487d91e60d..5cce8c9d0026 100644
--- a/drivers/dma/ti-dma-crossbar.c
+++ b/drivers/dma/ti-dma-crossbar.c
@@ -162,12 +162,9 @@ static int ti_dma_xbar_probe(struct platform_device *pdev)
xbar->safe_val = (u16)safe_val;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -ENODEV;
-
iomem = devm_ioremap_resource(&pdev->dev, res);
- if (!iomem)
- return -ENOMEM;
+ if (IS_ERR(iomem))
+ return PTR_ERR(iomem);
xbar->iomem = iomem;
OpenPOWER on IntegriCloud