1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:48:11 +00:00

Kernel/ACPI: Return Optional container after table search

This is a better pattern than returning a PhysicalAddress with a zero
value, so the code is more understandable now.
This commit is contained in:
Liav A 2021-09-07 07:29:11 +03:00 committed by Andreas Kling
parent 43b17f27a3
commit bde3c7301e
7 changed files with 26 additions and 25 deletions

View file

@ -115,7 +115,7 @@ UNMAP_AFTER_INIT PhysicalAddress InterruptManagement::search_for_madt()
auto rsdp = ACPI::StaticParsing::find_rsdp();
if (!rsdp.has_value())
return {};
return ACPI::StaticParsing::find_table(rsdp.value(), "APIC");
return ACPI::StaticParsing::find_table(rsdp.value(), "APIC").value();
}
UNMAP_AFTER_INIT InterruptManagement::InterruptManagement()