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>
This commit is contained in:
parent
1eb995bbf7
commit
28eb232f21
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user