aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/cpufreq/cpufreq_stats.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index 80801f880dd8..d2299ca2fc2c 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -192,8 +192,10 @@ static int __cpufreq_stats_create_table(struct cpufreq_policy *policy)
192 if (unlikely(!table)) 192 if (unlikely(!table))
193 return 0; 193 return 0;
194 194
195 /* stats already initialized */
195 if (per_cpu(cpufreq_stats_table, cpu)) 196 if (per_cpu(cpufreq_stats_table, cpu))
196 return -EBUSY; 197 return -EEXIST;
198
197 stat = kzalloc(sizeof(*stat), GFP_KERNEL); 199 stat = kzalloc(sizeof(*stat), GFP_KERNEL);
198 if ((stat) == NULL) 200 if ((stat) == NULL)
199 return -ENOMEM; 201 return -ENOMEM;