Skip to content

Commit 83dd137

Browse files
icklesumitsemwal
authored andcommitted
dma-fence: Clear fence->status during dma_fence_init()
As the fence->status is an optional field that may be set before dma_fence_signal() is called to convey that the fence completed with an error, we have to ensure that it is always set to zero on initialisation so that the typical use (i.e. unset) always flags a successful completion. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> Link: http://patchwork.freedesktop.org/patch/msgid/20170104141222.6992-1-chris@chris-wilson.co.uk
1 parent 011cda5 commit 83dd137

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/dma-buf/dma-fence.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,7 @@ dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops,
541541
fence->context = context;
542542
fence->seqno = seqno;
543543
fence->flags = 0UL;
544+
fence->status = 0;
544545

545546
trace_dma_fence_init(fence);
546547
}

0 commit comments

Comments
 (0)