diff --git a/rust/kernel/firmware.rs b/rust/kernel/firmware.rs index 386c8fb44785..106a928a535e 100644 --- a/rust/kernel/firmware.rs +++ b/rust/kernel/firmware.rs @@ -26,14 +26,18 @@ type FwFunc = /// /// # Examples /// -/// ``` +/// ```no_run /// # use kernel::{c_str, device::Device, firmware::Firmware}; /// +/// # fn no_run() -> Result<(), Error> { /// # // SAFETY: *NOT* safe, just for the example to get an `ARef` instance /// # let dev = unsafe { Device::from_raw(core::ptr::null_mut()) }; /// -/// let fw = Firmware::request(c_str!("path/to/firmware.bin"), &dev).unwrap(); +/// let fw = Firmware::request(c_str!("path/to/firmware.bin"), &dev)?; /// let blob = fw.data(); +/// +/// # Ok(()) +/// # } /// ``` pub struct Firmware(NonNull);