Commit 28eb232f authored by Axel Lin's avatar Axel Lin Committed by Vinod Koul

dmaengine: ti-dma-crossbar: Fix checking return value of devm_ioremap_resource

devm_ioremap_resource returns ERR_PTR on failure.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 1eb995bb
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment