From: Arvind Yadav Date: Wed, 28 Sep 2016 10:45:11 +0000 (+0530) Subject: dmaengine: fsldma: Unmap region obtained by of_iomap X-Git-Tag: v4.14-rc1~2349^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=585a1db1bed7a0cf5142f859430024b98475a219;p=platform%2Fkernel%2Flinux-rpi.git dmaengine: fsldma: Unmap region obtained by of_iomap Free memory mapping, if probe is not successful. Signed-off-by: Arvind Yadav Acked-by: Li Yang Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 4b7a66d..6ccb787 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;