diff mbox

[V3,04/16] cpufreq: stats: initialize 'cur_time' on its definition

Message ID f6b08820927c368580677af08411ed3963292fc1.1420558386.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar Jan. 6, 2015, 3:39 p.m. UTC
'cur_time' is defined in the first line and is then assigned a value in the next
line. Initialize it while defining it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/cpufreq_stats.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index 14f8d858a63d..21bec770569d 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -36,9 +36,8 @@  static DEFINE_PER_CPU(struct cpufreq_stats *, cpufreq_stats_table);
 static int cpufreq_stats_update(unsigned int cpu)
 {
 	struct cpufreq_stats *stat;
-	unsigned long long cur_time;
+	unsigned long long cur_time = get_jiffies_64();
 
-	cur_time = get_jiffies_64();
 	spin_lock(&cpufreq_stats_lock);
 	stat = per_cpu(cpufreq_stats_table, cpu);
 	if (stat->time_in_state)