From: Chris Wilson Date: Wed, 4 Jan 2017 14:12:20 +0000 (+0000) Subject: dma-fence: Clear fence->status during dma_fence_init() X-Git-Tag: v4.14-rc1~1422^2~46^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83dd1376fd92f33bdeca9e83d479534a4e7f870b;p=platform%2Fkernel%2Flinux-rpi3.git 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 Reviewed-by: Tvrtko Ursulin Reviewed-by: Daniel Vetter Reviewed-by: Sumit Semwal Signed-off-by: Sumit Semwal Link: http://patchwork.freedesktop.org/patch/msgid/20170104141222.6992-1-chris@chris-wilson.co.uk --- diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c index 0212af7..cb6eef3 100644 --- a/drivers/dma-buf/dma-fence.c +++ b/drivers/dma-buf/dma-fence.c @@ -541,6 +541,7 @@ dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops, fence->context = context; fence->seqno = seqno; fence->flags = 0UL; + fence->status = 0; trace_dma_fence_init(fence); }