diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-01-18 10:53:28 +0200 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2022-01-18 21:00:46 +0200 |
commit | 3945e239e1108a9f72f1bda141198bb97b485ade (patch) | |
tree | 57dbe19a83bfadac91bb9ae31288dd6c908e98e9 | |
parent | 57ba67ed2a7d5055a2bf8d65183b8c62f355d83d (diff) | |
download | serenity-3945e239e1108a9f72f1bda141198bb97b485ade.zip |
Kernel: Don't populate the ACPI SysFS directory with a disabled ACPI
This would cause a nullptr dereference on ACPI::Parser::the().
-rw-r--r-- | Kernel/Firmware/SysFSFirmware.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Kernel/Firmware/SysFSFirmware.cpp b/Kernel/Firmware/SysFSFirmware.cpp index e1f6c084be..b0ee02e562 100644 --- a/Kernel/Firmware/SysFSFirmware.cpp +++ b/Kernel/Firmware/SysFSFirmware.cpp @@ -22,7 +22,8 @@ UNMAP_AFTER_INIT void FirmwareSysFSDirectory::initialize() void FirmwareSysFSDirectory::create_components() { m_components.append(BIOSSysFSDirectory::must_create(*this)); - m_components.append(ACPI::ACPISysFSDirectory::must_create(*this)); + if (ACPI::is_enabled()) + m_components.append(ACPI::ACPISysFSDirectory::must_create(*this)); m_components.append(PowerStateSwitchNode::must_create(*this)); } |