From: Viresh Kumar Date: Thu, 28 Aug 2014 05:52:25 +0000 (+0530) Subject: cpufreq: cpu0: don't validate clock on clk_put() X-Git-Tag: v3.18-rc1~109^2~3^2^2~12 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ed4b053cb864f29f57cf5a4c3f3c85cda22edaf1;p=karo-tx-linux.git cpufreq: cpu0: don't validate clock on clk_put() 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 Tested-by: Stephen Boyd Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c index 4cfde6340967..d2dc9216a2f2 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c @@ -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);