diff --git a/rust/kernel/platform.rs b/rust/kernel/platform.rs index 8836ac46b066..bdf89c8293fc 100644 --- a/rust/kernel/platform.rs +++ b/rust/kernel/platform.rs @@ -103,7 +103,7 @@ extern "C" fn remove_callback(pdev: *mut bindings::platform_device) { // SAFETY: The platform bus only ever calls the remove callback with a valid pointer to a // `struct platform_device`. // - // INVARIANT: `pdev` is valid for the duration of `probe_callback()`. + // INVARIANT: `pdev` is valid for the duration of `remove_callback()`. let pdev = unsafe { &*pdev.cast::>() }; // SAFETY: `remove_callback` is only ever called after a successful call to