summaryrefslogtreecommitdiff
path: root/Kernel/Devices/SB16.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Devices/SB16.cpp')
-rw-r--r--Kernel/Devices/SB16.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Devices/SB16.cpp b/Kernel/Devices/SB16.cpp
index fa48d20db8..2ae61c8ad2 100644
--- a/Kernel/Devices/SB16.cpp
+++ b/Kernel/Devices/SB16.cpp
@@ -230,6 +230,8 @@ KResultOr<size_t> SB16::write(FileDescription&, u64, const UserOrKernelBuffer& d
if (!page)
return ENOMEM;
auto vmobject = AnonymousVMObject::create_with_physical_page(*page);
+ if (!vmobject)
+ return ENOMEM;
m_dma_region = MM.allocate_kernel_region_with_vmobject(*vmobject, PAGE_SIZE, "SB16 DMA buffer", Region::Access::Write);
if (!m_dma_region)
return ENOMEM;