Skip to contentSkip to conversation

t7l66xb: properly free clk32k clock source

PATCH In review Axel Lin 2 participants 2 messages Jul 1, 2010 – Jul 2, 2010 Multifunction devices (MFD)

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 t7l66xb: properly free clk32k clock source

This patch includes below fixes to properly free clk32k clock source:
1. remove a redundant clk_put in t7l66xb_probe error path
2. add missing clk_disable(t7l66xb->clk32k) and clk_put(t7l66xb->clk32k) to properly free the clock source.

---
 drivers/mfd/t7l66xb.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/mfd/t7l66xb.c +2 -1
index 5041d33..006c121 100644
@@ -350,7 +350,6 @@ static int t7l66xb_probe(struct platform_device *dev)
 	t7l66xb->clk48m = clk_get(&dev->dev, "CLK_CK48M");
 	if (IS_ERR(t7l66xb->clk48m)) {
 		ret = PTR_ERR(t7l66xb->clk48m);
-		clk_put(t7l66xb->clk32k);
 		goto err_clk48m_get;
 	}
 
@@ -425,6 +424,8 @@ static int t7l66xb_remove(struct platform_device *dev)
 	ret = pdata->disable(dev);
 	clk_disable(t7l66xb->clk48m);
 	clk_put(t7l66xb->clk48m);
+	clk_disable(t7l66xb->clk32k);
+	clk_put(t7l66xb->clk32k);
 	t7l66xb_detach_irq(dev);
 	iounmap(t7l66xb->scr);
 	release_resource(&t7l66xb->rscr);
Signature · 1 line
1.5.4.3
#1 lore raw

Hi Alex,

Quoted 4 lines · Axel Lin

This patch includes below fixes to properly free clk32k clock source:
1. remove a redundant clk_put in t7l66xb_probe error path
2. add missing clk_disable(t7l66xb->clk32k) and clk_put(t7l66xb->clk32k) to properly free the clock source.

Patch applied to my for-next branch. This almost looks like 2.6.35 material though.

Cheers,
Samuel.

Quoted 31 lines
---
 drivers/mfd/t7l66xb.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/mfd/t7l66xb.c +2 -1
index 5041d33..006c121 100644
@@ -350,7 +350,6 @@ static int t7l66xb_probe(struct platform_device *dev)
 	t7l66xb->clk48m = clk_get(&dev->dev, "CLK_CK48M");
 	if (IS_ERR(t7l66xb->clk48m)) {
 		ret = PTR_ERR(t7l66xb->clk48m);
-		clk_put(t7l66xb->clk32k);
 		goto err_clk48m_get;
 	}
 
@@ -425,6 +424,8 @@ static int t7l66xb_remove(struct platform_device *dev)
 	ret = pdata->disable(dev);
 	clk_disable(t7l66xb->clk48m);
 	clk_put(t7l66xb->clk48m);
+	clk_disable(t7l66xb->clk32k);
+	clk_put(t7l66xb->clk32k);
 	t7l66xb_detach_irq(dev);
 	iounmap(t7l66xb->scr);
 	release_resource(&t7l66xb->rscr);
Signature · 1 line
1.5.4.3
Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/