summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_syncobj.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2022-06-13 09:34:54 +0300
committerChristian König <christian.koenig@amd.com>2022-06-13 09:54:16 +0300
commitf4e3a12bf2d1983b8f352b7719794c52be7e0990 (patch)
tree3ffe1803217afb879f3829440da79938a557bf7f /drivers/gpu/drm/drm_syncobj.c
parent16490922a95f4f67eb9d918f94a4f5b5bdc9eb80 (diff)
downloadlinux-f4e3a12bf2d1983b8f352b7719794c52be7e0990.tar.xz
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: ec8d985ff26f ("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
Diffstat (limited to 'drivers/gpu/drm/drm_syncobj.c')
-rw-r--r--drivers/gpu/drm/drm_syncobj.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index bbad9e4696e7..0c2be8360525 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -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) {