Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] dma/fsldma : Unmap region obtained by of_iomap

30 views
Skip to first unread message

Arvind Yadav

unread,
Sep 28, 2016, 6:50:06 AM9/28/16
to
Free memory mapping, if probe is not successful.

Signed-off-by: Arvind Yadav <arvind....@gmail.com>
---
drivers/dma/fsldma.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 911b717..7ba8944 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;
--
1.7.9.5

Leo Li

unread,
Sep 29, 2016, 3:40:05 PM9/29/16
to


> -----Original Message-----
> From: Arvind Yadav [mailto:arvind....@gmail.com]
> Sent: Wednesday, September 28, 2016 5:45 AM
> To: le...@freescale.com; z...@zh-kernel.org; vinod...@intel.com
> Cc: dan.j.w...@intel.com; linuxp...@lists.ozlabs.org;
> dmae...@vger.kernel.org; linux-...@vger.kernel.org
> Subject: [PATCH] dma/fsldma : Unmap region obtained by of_iomap
>
> Free memory mapping, if probe is not successful.
>
> Signed-off-by: Arvind Yadav <arvind....@gmail.com>

Acked-by: Li Yang <leoya...@nxp.com>

Vinod Koul

unread,
Sep 30, 2016, 1:50:05 PM9/30/16
to
On Wed, Sep 28, 2016 at 04:15:11PM +0530, Arvind Yadav wrote:
> Free memory mapping, if probe is not successful.

Please use proper subsystem tags for patches. Hint: use git log to find that
out

Applied after fixing the tag

--
~Vinod
0 new messages