summaryrefslogtreecommitdiffstats
path: root/drivers/idle/intel_idle.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-01-10 11:45:49 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-01-23 00:37:00 +0100
commit533da74a8c8d75af7958f4aa1abc944f061d1d85 (patch)
tree939f9e8330d4a92f7b874131f2c0eb54bb579227 /drivers/idle/intel_idle.c
parentintel_idle: Fold intel_idle_probe() into intel_idle_init() (diff)
downloadlinux-533da74a8c8d75af7958f4aa1abc944f061d1d85.tar.xz
linux-533da74a8c8d75af7958f4aa1abc944f061d1d85.zip
intel_idle: Clean up NULL pointer check in intel_idle_init()
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>
Diffstat (limited to 'drivers/idle/intel_idle.c')
-rw-r--r--drivers/idle/intel_idle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 690309c78dfb..fddb72e5f6fa 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -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();