mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:27:43 +00:00
Kernel/ScatterGatherList: Return ErrorOr from try_create
This removes the TODO from the try_create API to return ErrorOr. This is also a preparation patch to move the init code in the constructor that can fail to this try_create function.
This commit is contained in:
parent
4617c05a08
commit
489e268b96
3 changed files with 5 additions and 9 deletions
|
@ -429,7 +429,7 @@ Optional<AsyncDeviceRequest::RequestResult> AHCIPort::prepare_and_set_scatter_li
|
|||
allocated_dma_regions.append(m_dma_buffers.at(index));
|
||||
}
|
||||
|
||||
m_current_scatter_list = Memory::ScatterGatherList::try_create(request, allocated_dma_regions.span(), m_connected_device->block_size());
|
||||
m_current_scatter_list = Memory::ScatterGatherList::try_create(request, allocated_dma_regions.span(), m_connected_device->block_size()).release_value_but_fixme_should_propagate_errors();
|
||||
if (!m_current_scatter_list)
|
||||
return AsyncDeviceRequest::Failure;
|
||||
if (request.request_type() == AsyncBlockDeviceRequest::Write) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue