File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments