Commit 585e8a26 authored by Alok Tiwari's avatar Alok Tiwari Committed by Danilo Krummrich
Browse files

rust: platform: fix remove_callback invariant comment



Correct copy-paste errors where remove_callback safety invariants
incorrectly referenced probe_callback().

Signed-off-by: default avatarAlok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260110115159.2313116-1-alok.a.tiwari@oracle.com


Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
parent 601cd264
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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