You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rust/error: add helper function to convert a C error pointer to a Result
Some kernel C API functions return a pointer which embeds an optional
`errno`. Callers are supposed to check the returned pointer with
`IS_ERR()` and if this returns `true`, retrieve the `errno` using
`PTR_ERR()`.
Create a Rust helper function to implement the Rust equivalent:
transform a `*mut T` to `Result<*mut T>`.
Co-Created-By: Boqun Feng <[email protected]>
Co-Created-By: Miguel Ojeda <[email protected]>
Signed-off-by: Sven Van Asbroeck <[email protected]>
0 commit comments