summaryrefslogtreecommitdiff
path: root/rust/kernel/module_param.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/kernel/module_param.rs')
-rw-r--r--rust/kernel/module_param.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/kernel/module_param.rs b/rust/kernel/module_param.rs
index e7d5c930a467..6a8a7a875643 100644
--- a/rust/kernel/module_param.rs
+++ b/rust/kernel/module_param.rs
@@ -70,6 +70,7 @@ where
// SAFETY: By function safety requirement, val is non-null, null-terminated
// and valid for reads for the duration of this function.
let arg = unsafe { CStr::from_char_ptr(val) };
+ let arg: &BStr = arg.as_ref();
crate::error::from_result(|| {
let new_value = T::try_from_param_arg(arg)?;