浏览代码

mfd: Properly free t7l66xb 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.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Axel Lin 15 年之前
父节点
当前提交
d2d272a965
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/mfd/t7l66xb.c

+ 2 - 1
drivers/mfd/t7l66xb.c

@@ -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);