mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
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:
parent
601cd264a3
commit
585e8a26ab
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user