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

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

View file

@ -21,7 +21,9 @@ UNMAP_AFTER_INIT OwnPtr<MultiProcessorParser> MultiProcessorParser::autodetect()
auto floating_pointer = find_floating_pointer(); auto floating_pointer = find_floating_pointer();
if (!floating_pointer.has_value()) if (!floating_pointer.has_value())
return {}; 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) UNMAP_AFTER_INIT MultiProcessorParser::MultiProcessorParser(PhysicalAddress floating_pointer)