diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-05-28 05:03:37 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-29 09:04:05 +0200 |
commit | 32f96eb937bdad324c28bcd875d6340261bd1e12 (patch) | |
tree | 9a8a24e3482c7111bc9e15ea7a263a2a3f94bd14 /Kernel | |
parent | af2c3ab52482c1180d36337ab26a9d2c0cae9af6 (diff) | |
download | serenity-32f96eb937bdad324c28bcd875d6340261bd1e12.zip |
Kernel: Remove usage of adopt_own in MultiProcessorParser
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/ACPI/MultiProcessorParser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Kernel/ACPI/MultiProcessorParser.cpp b/Kernel/ACPI/MultiProcessorParser.cpp index cc7951df85..6ef63622e8 100644 --- a/Kernel/ACPI/MultiProcessorParser.cpp +++ b/Kernel/ACPI/MultiProcessorParser.cpp @@ -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) |