public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tc6387xb: fix resource reclaim
@ 2010-08-03  5:44 Axel Lin
  2010-08-03 10:33 ` Samuel Ortiz
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2010-08-03  5:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Samuel Ortiz, Ian Molton

This patch includes below fixes:
1. add a missing iounmap in tc6387xb_probe() error path
2. fix resource reclaim in tc6387xb_remove()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/mfd/tc6387xb.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/tc6387xb.c b/drivers/mfd/tc6387xb.c
index 517f9bc..1bc71da 100644
--- a/drivers/mfd/tc6387xb.c
+++ b/drivers/mfd/tc6387xb.c
@@ -201,6 +201,7 @@ static int tc6387xb_probe(struct platform_device *dev)
 	if (!ret)
 		return 0;
 
+	iounmap(tc6387xb->scr);
 err_ioremap:
 	release_resource(&tc6387xb->rscr);
 err_resource:
@@ -213,12 +214,15 @@ err_no_irq:
 
 static int tc6387xb_remove(struct platform_device *dev)
 {
-	struct clk *clk32k = platform_get_drvdata(dev);
+	struct tc6387xb *tc6387xb = platform_get_drvdata(dev);
 
 	mfd_remove_devices(&dev->dev);
-	clk_disable(clk32k);
-	clk_put(clk32k);
+	iounmap(tc6387xb->scr);
+	release_resource(&tc6387xb->rscr);
+	clk_disable(tc6387xb->clk32k);
+	clk_put(tc6387xb->clk32k);
 	platform_set_drvdata(dev, NULL);
+	kfree(tc6387xb);
 
 	return 0;
 }
-- 
1.5.4.3




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] tc6387xb: fix resource reclaim
  2010-08-03  5:44 [PATCH 1/2] tc6387xb: fix resource reclaim Axel Lin
@ 2010-08-03 10:33 ` Samuel Ortiz
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Ortiz @ 2010-08-03 10:33 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Ian Molton

On Tue, Aug 03, 2010 at 01:44:00PM +0800, Axel Lin wrote:
> This patch includes below fixes:
> 1. add a missing iounmap in tc6387xb_probe() error path
> 2. fix resource reclaim in tc6387xb_remove()
Patch applied, thanks.

Cheers,
Samuel.
-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-03 10:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-03  5:44 [PATCH 1/2] tc6387xb: fix resource reclaim Axel Lin
2010-08-03 10:33 ` Samuel Ortiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox