summaryrefslogtreecommitdiff
path: root/Kernel/Devices/MemoryDevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Devices/MemoryDevice.cpp')
-rw-r--r--Kernel/Devices/MemoryDevice.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Devices/MemoryDevice.cpp b/Kernel/Devices/MemoryDevice.cpp
index 30367eed6a..6396f07b5d 100644
--- a/Kernel/Devices/MemoryDevice.cpp
+++ b/Kernel/Devices/MemoryDevice.cpp
@@ -38,7 +38,7 @@ ErrorOr<size_t> MemoryDevice::read(OpenFileDescription&, u64 offset, UserOrKerne
dbgln("MemoryDevice: Trying to read physical memory at {} for range of {} bytes failed due to violation of access", PhysicalAddress(offset), length);
return EINVAL;
}
- auto mapping = Memory::map_typed<u8>(PhysicalAddress(offset), length);
+ auto mapping = TRY(Memory::map_typed<u8>(PhysicalAddress(offset), length));
auto bytes = ReadonlyBytes { mapping.ptr(), length };
TRY(buffer.write(bytes));