Commit f55d17e9 authored by Chris Wilson's avatar Chris Wilson Committed by Greg Kroah-Hartman

dma-fence: Clear fence->status during dma_fence_init()

commit 83dd1376 upstream.

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: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20170104141222.6992-1-chris@chris-wilson.co.uk
[s/dma_fence/fence/g - gregkh]
Cc: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9ae85fab
......@@ -526,6 +526,7 @@ fence_init(struct fence *fence, const struct fence_ops *ops,
fence->context = context;
fence->seqno = seqno;
fence->flags = 0UL;
fence->status = 0;
trace_fence_init(fence);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment