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

Subsystems: dma generic offload engine subsystem, freescale dma driver, the rest

STALE3597d

3 messages, 3 authors, 2016-09-30 · open the first message on its own page

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

From: Arvind Yadav <hidden>
Date: 2016-09-28 10:46:27

Free memory mapping, if probe is not successful.

Signed-off-by: Arvind Yadav <redacted>
---
 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

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

From: Leo Li <hidden>
Date: 2016-09-29 19:30:33

-----Original Message-----
From: Arvind Yadav [mailto:arvind.yadav.cs@gmail.com]
Sent: Wednesday, September 28, 2016 5:45 AM
To: leoli@freescale.com; zw@zh-kernel.org; vinod.koul@intel.com
Cc: dan.j.williams@intel.com; linuxppc-dev@lists.ozlabs.org;
dmaengine@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: [PATCH] dma/fsldma : Unmap region obtained by of_iomap
=20
Free memory mapping, if probe is not successful.
=20
Signed-off-by: Arvind Yadav <redacted>
Acked-by: Li Yang <redacted>
quoted hunk
---
 drivers/dma/fsldma.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
=20
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 =3D -ENOMEM;
-		goto out_free_fdev;
+		goto out_free;
 	}
=20
 	/* map the channel IRQ if it exists, but don't hookup the handler yet *=
/
quoted hunk
@@ -1416,6 +1416,8 @@ static int fsldma_of_probe(struct platform_device
*op)
=20
 out_free_fdev:
 	irq_dispose_mapping(fdev->irq);
+	iounmap(fdev->regs);
+out_free:
 	kfree(fdev);
 out_return:
 	return err;
--
1.7.9.5

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

From: Vinod Koul <hidden>
Date: 2016-09-30 17:48:24

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help