Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Yang Yingliang and committed by
Christian König
f4e3a12b 16490922

+3 -1
+3 -1
drivers/gpu/drm/drm_syncobj.c
··· 874 874 875 875 fence = dma_fence_unwrap_merge(tmp); 876 876 dma_fence_put(tmp); 877 - if (!fence) 877 + if (!fence) { 878 + ret = -ENOMEM; 878 879 goto err_put_timeline; 880 + } 879 881 880 882 chain = dma_fence_chain_alloc(); 881 883 if (!chain) {