mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:58:12 +00:00
Kernel: Make UserOrKernelBuffer return KResult from read/write/memset
This allows us to simplify a whole bunch of call sites with TRY(). :^)
This commit is contained in:
parent
7bf8844499
commit
b481132418
29 changed files with 85 additions and 118 deletions
|
@ -276,8 +276,7 @@ KResultOr<size_t> SB16::write(FileDescription&, u64, UserOrKernelBuffer const& d
|
|||
|
||||
u8 mode = (u8)SampleFormat::Signed | (u8)SampleFormat::Stereo;
|
||||
|
||||
if (!data.read(m_dma_region->vaddr().as_ptr(), length))
|
||||
return EFAULT;
|
||||
TRY(data.read(m_dma_region->vaddr().as_ptr(), length));
|
||||
dma_start(length);
|
||||
|
||||
// 16-bit single-cycle output.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue