diff options
Diffstat (limited to 'Kernel/Devices/FullDevice.cpp')
-rw-r--r-- | Kernel/Devices/FullDevice.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/Devices/FullDevice.cpp b/Kernel/Devices/FullDevice.cpp index 20e2e7543a..de5aa9c344 100644 --- a/Kernel/Devices/FullDevice.cpp +++ b/Kernel/Devices/FullDevice.cpp @@ -32,8 +32,7 @@ bool FullDevice::can_read(const FileDescription&, size_t) const KResultOr<size_t> FullDevice::read(FileDescription&, u64, UserOrKernelBuffer& buffer, size_t size) { - if (!buffer.memset(0, size)) - return EFAULT; + TRY(buffer.memset(0, size)); return size; } |