]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
dmaengine: fsldma: Unmap region obtained by of_iomap
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 28 Sep 2016 10:45:11 +0000 (16:15 +0530)
committerVinod Koul <vinod.koul@intel.com>
Fri, 30 Sep 2016 17:55:14 +0000 (23:25 +0530)
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>
drivers/dma/fsldma.c

index 4b7a66d357d21bed0abbfac3ea3f914b7f8ac882..6ccb787ba56d6eda64b49d13da4e7daaaaf170ac 100644 (file)
@@ -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;