diff options
Diffstat (limited to 'drivers/cpufreq/cpufreq_stats.c')
-rw-r--r-- | drivers/cpufreq/cpufreq_stats.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index ff16a87125d9..19b4c3e7c390 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c | |||
@@ -196,6 +196,11 @@ cpufreq_stats_create_table (struct cpufreq_policy *policy, | |||
196 | return -ENOMEM; | 196 | return -ENOMEM; |
197 | 197 | ||
198 | data = cpufreq_cpu_get(cpu); | 198 | data = cpufreq_cpu_get(cpu); |
199 | if (data == NULL) { | ||
200 | ret = -EINVAL; | ||
201 | goto error_get_fail; | ||
202 | } | ||
203 | |||
199 | if ((ret = sysfs_create_group(&data->kobj, &stats_attr_group))) | 204 | if ((ret = sysfs_create_group(&data->kobj, &stats_attr_group))) |
200 | goto error_out; | 205 | goto error_out; |
201 | 206 | ||