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: ec8d985ff2 ("drm: use dma_fence_unwrap_merge() in drm_syncobj")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220613063454.2609364-1-yangyingliang@huawei.com
This commit is contained in:
Yang Yingliang 2022-06-13 14:34:54 +08:00 committed by Christian König
parent 16490922a9
commit f4e3a12bf2
1 changed files with 3 additions and 1 deletions

View File

@ -874,8 +874,10 @@ static int drm_syncobj_transfer_to_timeline(struct drm_file *file_private,
fence = dma_fence_unwrap_merge(tmp);
dma_fence_put(tmp);
if (!fence)
if (!fence) {
ret = -ENOMEM;
goto err_put_timeline;
}
chain = dma_fence_chain_alloc();
if (!chain) {