Commit 601cd264 authored by Alok Tiwari's avatar Alok Tiwari Committed by Danilo Krummrich
Browse files

rust: auxiliary: 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/20260110114817.2312828-1-alok.a.tiwari@oracle.com


Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
parent 8f799b4e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ extern "C" fn remove_callback(adev: *mut bindings::auxiliary_device) {
        // SAFETY: The auxiliary bus only ever calls the probe callback with a valid pointer to a
        // `struct auxiliary_device`.
        //
        // INVARIANT: `adev` is valid for the duration of `probe_callback()`.
        // INVARIANT: `adev` is valid for the duration of `remove_callback()`.
        let adev = unsafe { &*adev.cast::<Device<device::CoreInternal>>() };

        // SAFETY: `remove_callback` is only ever called after a successful call to