From f7b5352af0742040969805e01f059185ebb582ea Mon Sep 17 00:00:00 2001 From: Liav A Date: Sat, 8 May 2021 15:37:10 +0300 Subject: [PATCH] Kernel/HID: Don't assume that ACPI is initialized --- Kernel/Devices/HID/HIDManagement.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Kernel/Devices/HID/HIDManagement.cpp b/Kernel/Devices/HID/HIDManagement.cpp index faa9b6753c..da0ca75f6b 100644 --- a/Kernel/Devices/HID/HIDManagement.cpp +++ b/Kernel/Devices/HID/HIDManagement.cpp @@ -107,7 +107,9 @@ UNMAP_AFTER_INIT void HIDManagement::enumerate() // emulation of the PS/2 controller if it was set by the BIOS. // If ACPI indicates we have an i8042 controller and the USB controller was // set to emulate PS/2, we should not initialize the PS/2 controller. - if (!ACPI::Parser::the()->have_8042() || kernel_command_line().disable_ps2_controller()) + if (kernel_command_line().disable_ps2_controller()) + return; + if (ACPI::Parser::the() && !ACPI::Parser::the()->have_8042()) return; m_i8042_controller = I8042Controller::initialize(); m_i8042_controller->detect_devices();