From: Alok Tiwari Date: Sat, 10 Jan 2026 11:51:56 +0000 (-0800) Subject: rust: platform: fix remove_callback invariant comment X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=585e8a26abfd0c453f01ef78bd637cb7600e9b04;p=thirdparty%2Fkernel%2Flinux.git rust: platform: fix remove_callback invariant comment Correct copy-paste errors where remove_callback safety invariants incorrectly referenced probe_callback(). Signed-off-by: Alok Tiwari Reviewed-by: Alice Ryhl Link: https://patch.msgid.link/20260110115159.2313116-1-alok.a.tiwari@oracle.com Signed-off-by: Danilo Krummrich --- 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 @@ impl Adapter { // 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