diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2016-09-28 16:15:11 +0530 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-09-30 23:25:14 +0530 |
commit | 585a1db1bed7a0cf5142f859430024b98475a219 (patch) | |
tree | d556e9e87cf43d919c3799f5070c9ae50227089a /drivers/dma/fsldma.c | |
parent | fc878efe84c342441706fcdf776e08fe455fe9c1 (diff) | |
download | linux-585a1db1bed7a0cf5142f859430024b98475a219.tar.bz2 |
dmaengine: fsldma: Unmap region obtained by of_iomap
Free memory mapping, if probe is not successful.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Li Yang <leoyang.li@nxp.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/fsldma.c')
-rw-r--r-- | drivers/dma/fsldma.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 4b7a66d357d2..6ccb787ba56d 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c @@ -1351,7 +1351,7 @@ static int fsldma_of_probe(struct platform_device *op) if (!fdev->regs) { dev_err(&op->dev, "unable to ioremap registers\n"); err = -ENOMEM; - goto out_free_fdev; + goto out_free; } /* 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) out_free_fdev: irq_dispose_mapping(fdev->irq); + iounmap(fdev->regs); +out_free: kfree(fdev); out_return: return err; |