From: Viresh Kumar <viresh.kumar@linaro.org>
Date: Mon, 16 Sep 2013 13:26:45 +0000 (+0530)
Subject: cpufreq: loongson2: call cpufreq_frequency_table_put_attr()
X-Git-Tag: firefly_0821_release~176^2~4823^2~1^3~23^2~117
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=999fe7951a49fa885f52df85c4f91c913858a232;p=firefly-linux-kernel-4.4.55.git

cpufreq: loongson2: call cpufreq_frequency_table_put_attr()

Drivers which have an exit path must call cpufreq_frequency_table_put_attr() if
they have called cpufreq_frequency_table_get_attr() in their init path.

This driver was missing this part and is fixed with this patch.

Cc: John Crispin <blogic@openwrt.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---

diff --git a/drivers/cpufreq/loongson2_cpufreq.c b/drivers/cpufreq/loongson2_cpufreq.c
index 5dd3692441f7..cec4e723d61b 100644
--- a/drivers/cpufreq/loongson2_cpufreq.c
+++ b/drivers/cpufreq/loongson2_cpufreq.c
@@ -145,6 +145,7 @@ static int loongson2_cpufreq_verify(struct cpufreq_policy *policy)
 
 static int loongson2_cpufreq_exit(struct cpufreq_policy *policy)
 {
+	cpufreq_frequency_table_put_attr(policy->cpu);
 	clk_put(cpuclk);
 	return 0;
 }