File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -431,9 +431,6 @@ init_cpu_capacity_callback(struct notifier_block *nb,
431
431
struct cpufreq_policy * policy = data ;
432
432
int cpu ;
433
433
434
- if (!raw_capacity )
435
- return 0 ;
436
-
437
434
if (val != CPUFREQ_CREATE_POLICY )
438
435
return 0 ;
439
436
@@ -450,9 +447,11 @@ init_cpu_capacity_callback(struct notifier_block *nb,
450
447
}
451
448
452
449
if (cpumask_empty (cpus_to_visit )) {
453
- topology_normalize_cpu_scale ();
454
- schedule_work (& update_topology_flags_work );
455
- free_raw_capacity ();
450
+ if (raw_capacity ) {
451
+ topology_normalize_cpu_scale ();
452
+ schedule_work (& update_topology_flags_work );
453
+ free_raw_capacity ();
454
+ }
456
455
pr_debug ("cpu_capacity: parsing done\n" );
457
456
schedule_work (& parsing_done_work );
458
457
}
@@ -472,7 +471,7 @@ static int __init register_cpufreq_notifier(void)
472
471
* On ACPI-based systems skip registering cpufreq notifier as cpufreq
473
472
* information is not needed for cpu capacity initialization.
474
473
*/
475
- if (!acpi_disabled || ! raw_capacity )
474
+ if (!acpi_disabled )
476
475
return - EINVAL ;
477
476
478
477
if (!alloc_cpumask_var (& cpus_to_visit , GFP_KERNEL ))
You can’t perform that action at this time.
0 commit comments