Skip to content

Commit 8a1b5d4

Browse files
committed
ACPI: processor: Update cpuidle driver check in __acpi_processor_start()
Commit 7a8c994 ("ACPI: processor: idle: Optimize ACPI idle driver registration") moved the ACPI idle driver registration to acpi_processor_driver_init() and acpi_processor_power_init() does not register an idle driver any more. Accordingly, the cpuidle driver check in __acpi_processor_start() needs to be updated to avoid calling acpi_processor_power_init() without a cpuidle driver, in which case the registration of the cpuidle device in that function would lead to a NULL pointer dereference in __cpuidle_register_device(). Fixes: 7a8c994 ("ACPI: processor: idle: Optimize ACPI idle driver registration") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Link: https://patch.msgid.link/5044465.31r3eYUQgx@rafael.j.wysocki [ rjw: Changelog update ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent bdf780f commit 8a1b5d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/processor_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static int __acpi_processor_start(struct acpi_device *device)
166166
if (result && !IS_ENABLED(CONFIG_ACPI_CPU_FREQ_PSS))
167167
dev_dbg(&device->dev, "CPPC data invalid or not present\n");
168168

169-
if (!cpuidle_get_driver() || cpuidle_get_driver() == &acpi_idle_driver)
169+
if (cpuidle_get_driver() == &acpi_idle_driver)
170170
acpi_processor_power_init(pr);
171171

172172
acpi_pss_perf_init(pr);

0 commit comments

Comments
 (0)