File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -256,16 +256,19 @@ impl<T: DriverObject> Object<T> {
256256
257257 /// Create a new GEM object.
258258 pub fn new ( dev : & device:: Device < T :: Driver > , size : usize ) -> Result < Pin < UniqueObjectRef < Self > > > {
259- let obj: Pin < Box < Self > > = Box :: pin_init ( try_pin_init ! ( Self {
260- // SAFETY: This struct is expected to be zero-initialized
261- obj: bindings:: drm_gem_object {
262- funcs: & Self :: OBJECT_FUNCS ,
263- ..Default :: default ( )
264- } ,
265- inner <- T :: new( dev, size) ,
266- dev: dev. drm. get( ) ,
267- _p: PhantomPinned
268- } ) ) ?;
259+ let obj: Pin < Box < Self > > = Box :: try_pin_init (
260+ try_pin_init ! ( Self {
261+ // SAFETY: This struct is expected to be zero-initialized
262+ obj: bindings:: drm_gem_object {
263+ funcs: & Self :: OBJECT_FUNCS ,
264+ ..Default :: default ( )
265+ } ,
266+ inner <- T :: new( dev, size) ,
267+ dev: dev. drm. get( ) ,
268+ _p: PhantomPinned
269+ } ) ,
270+ GFP_KERNEL ,
271+ ) ?;
269272
270273 // SAFETY: Safe to call as long as the pointer is a properly allocated GEM object
271274 to_result ( unsafe {
You can’t perform that action at this time.
0 commit comments