Kernel: Remove usage of adopt_own in MultiProcessorParser

This commit is contained in:
Brian Gianforcaro 2021-05-28 05:03:37 -07:00 committed by Andreas Kling
parent af2c3ab524
commit 32f96eb937
Notes: sideshowbarker 2024-07-18 17:15:15 +09:00

View file

@ -21,7 +21,9 @@ UNMAP_AFTER_INIT OwnPtr<MultiProcessorParser> MultiProcessorParser::autodetect()
auto floating_pointer = find_floating_pointer();
if (!floating_pointer.has_value())
return {};
return adopt_own(*new MultiProcessorParser(floating_pointer.value()));
auto parser = adopt_own_if_nonnull(new MultiProcessorParser(floating_pointer.value()));
VERIFY(parser != nullptr);
return parser;
}
UNMAP_AFTER_INIT MultiProcessorParser::MultiProcessorParser(PhysicalAddress floating_pointer)