File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ pub trait RawDmaFence: crate::private::Sealed {
3838
3939 /// Advances this fence to the chain node which will signal this sequence number.
4040 /// If no sequence number is provided, this returns `self` again.
41- fn chain_find_seqno ( self , seqno : u64 ) -> Result < Fence >
41+ /// If the seqno has already been signaled, returns None.
42+ fn chain_find_seqno ( self , seqno : u64 ) -> Result < Option < Fence > >
4243 where
4344 Self : Sized ,
4445 {
@@ -53,10 +54,10 @@ pub trait RawDmaFence: crate::private::Sealed {
5354 unsafe { bindings:: dma_fence_put ( ptr) } ;
5455 Err ( Error :: from_errno ( ret) )
5556 } else if ptr. is_null ( ) {
56- Err ( EINVAL ) // When can this happen?
57+ Ok ( None )
5758 } else {
5859 // SAFETY: ptr is valid and non-NULL as checked above.
59- Ok ( unsafe { Fence :: from_raw ( ptr) } )
60+ Ok ( Some ( unsafe { Fence :: from_raw ( ptr) } ) )
6061 }
6162 }
6263
You can’t perform that action at this time.
0 commit comments