summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/ti-soc-thermal
diff options
context:
space:
mode:
authorLuis Henriques <henrix@camandro.org>2016-11-16 23:15:22 +0100
committerZhang Rui <rui.zhang@intel.com>2016-11-23 03:07:35 +0100
commit882f5815de0c8983010c20ea8ef3b204701cb6b0 (patch)
tree6ead82f339b1aa49da89f8b739ac36627483f07b /drivers/thermal/ti-soc-thermal
parentMerge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang... (diff)
downloadlinux-882f5815de0c8983010c20ea8ef3b204701cb6b0.tar.xz
linux-882f5815de0c8983010c20ea8ef3b204701cb6b0.zip
thermal: ti-soc-thermal: add missing clk_put()
This patch fixes the following Coccinelle error: ./drivers/thermal/ti-soc-thermal/ti-bandgap.c:1441:1-7: \ ERROR: missing clk_put; clk_get on line 1290 \ and execution via conditional on line 1298 Signed-off-by: Luis Henriques <henrix@camandro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/ti-soc-thermal')
-rw-r--r--drivers/thermal/ti-soc-thermal/ti-bandgap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
index 06ea9766a70a..ba9c302454fb 100644
--- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
@@ -1298,7 +1298,7 @@ int ti_bandgap_probe(struct platform_device *pdev)
if (IS_ERR(bgp->div_clk)) {
dev_err(&pdev->dev, "failed to request div_ts_ck clock ref\n");
ret = PTR_ERR(bgp->div_clk);
- goto free_irqs;
+ goto put_fclock;
}
for (i = 0; i < bgp->conf->sensor_count; i++) {
@@ -1430,8 +1430,9 @@ disable_clk:
if (TI_BANDGAP_HAS(bgp, CLK_CTRL))
clk_disable_unprepare(bgp->fclock);
put_clks:
- clk_put(bgp->fclock);
clk_put(bgp->div_clk);
+put_fclock:
+ clk_put(bgp->fclock);
free_irqs:
if (TI_BANDGAP_HAS(bgp, TSHUT)) {
free_irq(gpio_to_irq(bgp->tshut_gpio), NULL);