Commit f4e3a12b authored by Yang Yingliang's avatar Yang Yingliang Committed by Christian König

drm/syncobj: add missing error return code in drm_syncobj_transfer_to_timeline()

If dma_fence_unwrap_merge() fails, it should return error code
in drm_syncobj_transfer_to_timeline()

Fixes: ec8d985f ("drm: use dma_fence_unwrap_merge() in drm_syncobj")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220613063454.2609364-1-yangyingliang@huawei.com
parent 16490922
...@@ -874,8 +874,10 @@ static int drm_syncobj_transfer_to_timeline(struct drm_file *file_private, ...@@ -874,8 +874,10 @@ static int drm_syncobj_transfer_to_timeline(struct drm_file *file_private,
fence = dma_fence_unwrap_merge(tmp); fence = dma_fence_unwrap_merge(tmp);
dma_fence_put(tmp); dma_fence_put(tmp);
if (!fence) if (!fence) {
ret = -ENOMEM;
goto err_put_timeline; goto err_put_timeline;
}
chain = dma_fence_chain_alloc(); chain = dma_fence_chain_alloc();
if (!chain) { if (!chain) {
......
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