summaryrefslogtreecommitdiff
path: root/rust/kernel/uaccess.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/kernel/uaccess.rs')
-rw-r--r--rust/kernel/uaccess.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/kernel/uaccess.rs b/rust/kernel/uaccess.rs
index 80a9782b1c6e..e4882f113d79 100644
--- a/rust/kernel/uaccess.rs
+++ b/rust/kernel/uaccess.rs
@@ -290,7 +290,7 @@ impl UserSliceReader {
// SAFETY: Since the call to `read_raw` was successful, so the next `len` bytes of the
// vector have been initialized.
- unsafe { buf.set_len(buf.len() + len) };
+ unsafe { buf.inc_len(len) };
Ok(())
}
}