Skip to content

Commit

Permalink
intel_idle: Clean up NULL pointer check in intel_idle_init()
Browse files Browse the repository at this point in the history
Instead of comparing intel_idle_cpuidle_devices with NULL apply
the "!" (not) operator to it when checking it against NULL.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
rafaeljw committed Jan 22, 2020
1 parent a6c86e3 commit 533da74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/idle/intel_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1630,7 +1630,7 @@ static int __init intel_idle_init(void)
boot_cpu_data.x86_model);

intel_idle_cpuidle_devices = alloc_percpu(struct cpuidle_device);
if (intel_idle_cpuidle_devices == NULL)
if (!intel_idle_cpuidle_devices)
return -ENOMEM;

intel_idle_cpuidle_driver_init();
Expand Down

0 comments on commit 533da74

Please sign in to comment.