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 <alok.a.tiwari@oracle.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260110115159.2313116-1-alok.a.tiwari@oracle.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
Alok Tiwari 2026-01-10 03:51:56 -08:00 committed by Danilo Krummrich
parent 601cd264a3
commit 585e8a26ab

View File

@ -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::<Device<device::CoreInternal>>() };
// SAFETY: `remove_callback` is only ever called after a successful call to