Loading drivers/cpufreq/cpufreq_stats.c +7 −2 Original line number Diff line number Diff line Loading @@ -190,12 +190,16 @@ static int __cpufreq_stats_create_table(struct cpufreq_policy *policy, if (per_cpu(cpufreq_stats_table, cpu)) return -EBUSY; stat = kzalloc(sizeof(*stat), GFP_KERNEL); if ((stat) == NULL) if ((stat) == NULL) { pr_err("Failed to alloc cpufreq_stats table\n"); return -ENOMEM; } ret = sysfs_create_group(&policy->kobj, &stats_attr_group); if (ret) if (ret) { pr_err("Failed to create cpufreq_stats sysfs\n"); goto error_out; } stat->cpu = cpu; per_cpu(cpufreq_stats_table, cpu) = stat; Loading @@ -216,6 +220,7 @@ static int __cpufreq_stats_create_table(struct cpufreq_policy *policy, stat->time_in_state = kzalloc(alloc_size, GFP_KERNEL); if (!stat->time_in_state) { ret = -ENOMEM; pr_err("Failed to alloc cpufreq_stats table\n"); goto error_alloc; } stat->freq_table = (unsigned int *)(stat->time_in_state + count); Loading Loading
drivers/cpufreq/cpufreq_stats.c +7 −2 Original line number Diff line number Diff line Loading @@ -190,12 +190,16 @@ static int __cpufreq_stats_create_table(struct cpufreq_policy *policy, if (per_cpu(cpufreq_stats_table, cpu)) return -EBUSY; stat = kzalloc(sizeof(*stat), GFP_KERNEL); if ((stat) == NULL) if ((stat) == NULL) { pr_err("Failed to alloc cpufreq_stats table\n"); return -ENOMEM; } ret = sysfs_create_group(&policy->kobj, &stats_attr_group); if (ret) if (ret) { pr_err("Failed to create cpufreq_stats sysfs\n"); goto error_out; } stat->cpu = cpu; per_cpu(cpufreq_stats_table, cpu) = stat; Loading @@ -216,6 +220,7 @@ static int __cpufreq_stats_create_table(struct cpufreq_policy *policy, stat->time_in_state = kzalloc(alloc_size, GFP_KERNEL); if (!stat->time_in_state) { ret = -ENOMEM; pr_err("Failed to alloc cpufreq_stats table\n"); goto error_alloc; } stat->freq_table = (unsigned int *)(stat->time_in_state + count); Loading