diff --git a/Kernel/Devices/VMWareBackdoor.cpp b/Kernel/Devices/VMWareBackdoor.cpp index 285bedd41e..bceec4e01c 100644 --- a/Kernel/Devices/VMWareBackdoor.cpp +++ b/Kernel/Devices/VMWareBackdoor.cpp @@ -63,7 +63,7 @@ public: VMWareBackdoorDetector() { if (detect_presence()) - m_backdoor = make(); + m_backdoor = adopt_nonnull_own_or_enomem(new (nothrow) VMWareBackdoor()).release_value_but_fixme_should_propagate_errors(); } VMWareBackdoor* get_instance() diff --git a/Kernel/Interrupts/APIC.cpp b/Kernel/Interrupts/APIC.cpp index 5a46a6faac..0aa361d1f6 100644 --- a/Kernel/Interrupts/APIC.cpp +++ b/Kernel/Interrupts/APIC.cpp @@ -367,7 +367,7 @@ UNMAP_AFTER_INIT void APIC::setup_ap_boot_environment() // Allocate Processor structures for all APs and store the pointer to the data m_ap_processor_info.resize(aps_to_enable); for (size_t i = 0; i < aps_to_enable; i++) - m_ap_processor_info[i] = make(); + m_ap_processor_info[i] = adopt_nonnull_own_or_enomem(new (nothrow) Processor()).release_value_but_fixme_should_propagate_errors(); auto* ap_processor_info_array = &ap_stack_array[aps_to_enable]; for (size_t i = 0; i < aps_to_enable; i++) { ap_processor_info_array[i] = FlatPtr(m_ap_processor_info[i].ptr()); diff --git a/Kernel/Memory/PhysicalRegion.cpp b/Kernel/Memory/PhysicalRegion.cpp index b9089b37bf..9c4edfbed8 100644 --- a/Kernel/Memory/PhysicalRegion.cpp +++ b/Kernel/Memory/PhysicalRegion.cpp @@ -48,7 +48,7 @@ void PhysicalRegion::initialize_zones() size_t zone_count = 0; auto first_address = base_address; while (remaining_pages >= pages_per_zone) { - m_zones.append(make(base_address, pages_per_zone)); + m_zones.append(adopt_nonnull_own_or_enomem(new (nothrow) PhysicalZone(base_address, pages_per_zone)).release_value_but_fixme_should_propagate_errors()); base_address = base_address.offset(pages_per_zone * PAGE_SIZE); m_usable_zones.append(m_zones.last()); remaining_pages -= pages_per_zone; diff --git a/Kernel/Storage/Partition/EBRPartitionTable.cpp b/Kernel/Storage/Partition/EBRPartitionTable.cpp index 1dc8c016cf..2d1bdbb895 100644 --- a/Kernel/Storage/Partition/EBRPartitionTable.cpp +++ b/Kernel/Storage/Partition/EBRPartitionTable.cpp @@ -11,7 +11,7 @@ namespace Kernel { Result, PartitionTable::Error> EBRPartitionTable::try_to_initialize(const StorageDevice& device) { - auto table = make(device); + auto table = adopt_nonnull_own_or_enomem(new (nothrow) EBRPartitionTable(device)).release_value_but_fixme_should_propagate_errors(); if (table->is_protective_mbr()) return { PartitionTable::Error::MBRProtective }; if (!table->is_valid()) diff --git a/Kernel/Storage/Partition/GUIDPartitionTable.cpp b/Kernel/Storage/Partition/GUIDPartitionTable.cpp index d85e855857..ebb393415f 100644 --- a/Kernel/Storage/Partition/GUIDPartitionTable.cpp +++ b/Kernel/Storage/Partition/GUIDPartitionTable.cpp @@ -49,7 +49,7 @@ struct [[gnu::packed]] GUIDPartitionHeader { Result, PartitionTable::Error> GUIDPartitionTable::try_to_initialize(const StorageDevice& device) { - auto table = make(device); + auto table = adopt_nonnull_own_or_enomem(new (nothrow) GUIDPartitionTable(device)).release_value_but_fixme_should_propagate_errors(); if (!table->is_valid()) return { PartitionTable::Error::Invalid }; return table; diff --git a/Kernel/Storage/Partition/MBRPartitionTable.cpp b/Kernel/Storage/Partition/MBRPartitionTable.cpp index 4b6221412a..0c11cf7a70 100644 --- a/Kernel/Storage/Partition/MBRPartitionTable.cpp +++ b/Kernel/Storage/Partition/MBRPartitionTable.cpp @@ -17,7 +17,7 @@ namespace Kernel { Result, PartitionTable::Error> MBRPartitionTable::try_to_initialize(const StorageDevice& device) { - auto table = make(device); + auto table = adopt_nonnull_own_or_enomem(new (nothrow) MBRPartitionTable(device)).release_value_but_fixme_should_propagate_errors(); if (table->contains_ebr()) return { PartitionTable::Error::ContainsEBR }; if (table->is_protective_mbr()) @@ -29,7 +29,7 @@ Result, PartitionTable::Error> MBRPartitionTabl OwnPtr MBRPartitionTable::try_to_initialize(const StorageDevice& device, u32 start_lba) { - auto table = make(device, start_lba); + auto table = adopt_nonnull_own_or_enomem(new (nothrow) MBRPartitionTable(device, start_lba)).release_value_but_fixme_should_propagate_errors(); if (!table->is_valid()) return {}; return table;