Skip to content

Commit 245c4ce

Browse files
committed
fixup! *RFL import: kernel::platform
1 parent 3cd3694 commit 245c4ce

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

rust/kernel/platform.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ impl<T: Driver> Adapter<T> {
106106
})
107107
}
108108

109-
extern "C" fn remove_callback(pdev: *mut bindings::platform_device) -> core::ffi::c_int {
110-
from_result(|| {
109+
extern "C" fn remove_callback(pdev: *mut bindings::platform_device) {
110+
{
111111
// SAFETY: `pdev` is guaranteed to be a valid, non-null pointer.
112112
let ptr = unsafe { bindings::platform_get_drvdata(pdev) };
113113
// SAFETY:
@@ -117,11 +117,9 @@ impl<T: Driver> Adapter<T> {
117117
// `remove` is the canonical kernel location to free driver data. so OK
118118
// to convert the pointer back to a Rust structure here.
119119
let data = unsafe { T::Data::from_foreign(ptr) };
120-
let ret = T::remove(&data);
120+
let _ = T::remove(&data);
121121
<T::Data as driver::DeviceRemoval>::device_remove(&data);
122-
ret?;
123-
Ok(0)
124-
})
122+
}
125123
}
126124
}
127125

0 commit comments

Comments
 (0)