diff options
Diffstat (limited to 'rust/kernel/auxiliary.rs')
| -rw-r--r-- | rust/kernel/auxiliary.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/rust/kernel/auxiliary.rs b/rust/kernel/auxiliary.rs index cc67fa5ddde3..618eeeec2bd0 100644 --- a/rust/kernel/auxiliary.rs +++ b/rust/kernel/auxiliary.rs @@ -341,13 +341,12 @@ impl Registration { return Err(Error::from_errno(ret)); } - // SAFETY: `adev` is guaranteed to be non-null, since the `KBox` was allocated - // successfully. - // // INVARIANT: The device will remain registered until `auxiliary_device_delete()` is // called, which happens in `Self::drop()`. Ok(Devres::new( parent, + // SAFETY: `adev` is guaranteed to be non-null, since the `KBox` was allocated + // successfully. Self(unsafe { NonNull::new_unchecked(adev) }), )) }) |
