summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2015-07-10 16:13:19 +0200
committerVinod Koul <vinod.koul@intel.com>2015-08-05 07:10:06 +0200
commit28eb232f217583e7bece8e9d6b26cf55a694ceae (patch)
tree964b0adddfe4b8ab79d94d996a93e51118865b79 /drivers/dma
parentdmaengine: ti-dma-crossbar: Add support for eDMA (diff)
downloadlinux-28eb232f217583e7bece8e9d6b26cf55a694ceae.tar.xz
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')
-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;