]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
cpufreq: cpu0: don't validate clock on clk_put()
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 28 Aug 2014 05:52:25 +0000 (11:22 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 8 Sep 2014 23:44:40 +0000 (01:44 +0200)
CPU clk is not optional for this driver and probe would fail if it couldn't find
a suitable clock.

And so, while calling clk_put() we don't need to validate clocks.

Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq-cpu0.c

index 4cfde6340967b0dcb1273ec559a356f4bfb82c9e..d2dc9216a2f2d45700f3d413f50dcdefb8a40e33 100644 (file)
@@ -217,8 +217,7 @@ static int cpu0_cpufreq_probe(struct platform_device *pdev)
 out_free_table:
        dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
 out_put_clk:
-       if (!IS_ERR(cpu_clk))
-               clk_put(cpu_clk);
+       clk_put(cpu_clk);
 out_put_reg:
        if (!IS_ERR(cpu_reg))
                regulator_put(cpu_reg);