Commit 585a1db1 authored by Arvind Yadav's avatar Arvind Yadav Committed by Vinod Koul

dmaengine: fsldma: Unmap region obtained by of_iomap

Free memory mapping, if probe is not successful.
Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: default avatarLi Yang <leoyang.li@nxp.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent fc878efe
...@@ -1351,7 +1351,7 @@ static int fsldma_of_probe(struct platform_device *op) ...@@ -1351,7 +1351,7 @@ static int fsldma_of_probe(struct platform_device *op)
if (!fdev->regs) { if (!fdev->regs) {
dev_err(&op->dev, "unable to ioremap registers\n"); dev_err(&op->dev, "unable to ioremap registers\n");
err = -ENOMEM; err = -ENOMEM;
goto out_free_fdev; goto out_free;
} }
/* map the channel IRQ if it exists, but don't hookup the handler yet */ /* map the channel IRQ if it exists, but don't hookup the handler yet */
...@@ -1416,6 +1416,8 @@ static int fsldma_of_probe(struct platform_device *op) ...@@ -1416,6 +1416,8 @@ static int fsldma_of_probe(struct platform_device *op)
out_free_fdev: out_free_fdev:
irq_dispose_mapping(fdev->irq); irq_dispose_mapping(fdev->irq);
iounmap(fdev->regs);
out_free:
kfree(fdev); kfree(fdev);
out_return: out_return:
return err; return err;
......
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