From: Axel Lin Date: Fri, 10 Jul 2015 14:13:19 +0000 (+0800) Subject: dmaengine: ti-dma-crossbar: Fix checking return value of devm_ioremap_resource X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=28eb232f217583e7bece8e9d6b26cf55a694ceae;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Peter Ujfalusi Signed-off-by: Vinod Koul --- 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;