mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
Kernel: Make Kernel::VMObject allocation functions return KResultOr
This makes for nicer handling of errors compared to checking whether a RefPtr is null. Additionally, this will give way to return different types of errors in the future.
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 05:39:32 +09:00
Author: https://github.com/sin-ack Commit: https://github.com/SerenityOS/serenity/commit/4bfd6e41b95 Pull-request: https://github.com/SerenityOS/serenity/pull/9434 Reviewed-by: https://github.com/awesomekling
@@ -88,7 +88,8 @@ UNMAP_AFTER_INIT void BochsGraphicsAdapter::initialize_framebuffer_devices()
|
||||
{
|
||||
// FIXME: Find a better way to determine default resolution...
|
||||
m_framebuffer_device = FramebufferDevice::create(*this, 0, PhysicalAddress(PCI::get_BAR0(pci_address()) & 0xfffffff0), 1024, 768, 1024 * sizeof(u32));
|
||||
m_framebuffer_device->initialize();
|
||||
// FIXME: Would be nice to be able to return a KResult here.
|
||||
VERIFY(!m_framebuffer_device->initialize().is_error());
|
||||
}
|
||||
|
||||
GraphicsDevice::Type BochsGraphicsAdapter::type() const
|
||||
|
||||
Reference in New Issue
Block a user