drm/syncobj: add missing error return code in drm_syncobj_transfer_to_timeline()
Subsystems (2)
PATCH 1/1 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 <[email protected]>
Signed-off-by Yang Yingliang <[email protected]>
--- drivers/gpu/drm/drm_syncobj.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_syncobj.c +3 -1
@@ -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) {
Signature · 1 line
2.25.1
Am 13.06.22 um 08:34 schrieb Yang Yingliang:
Quoted 6 lines
If
dma_fence_unwrap_merge()fails, it should return error code indrm_syncobj_transfer_to_timeline()Fixes ec8d985ff26f ("drm: use dma_fence_unwrap_merge() in drm_syncobj")Reported-by Hulk Robot <[email protected]>Signed-off-by Yang Yingliang <[email protected]>
Reviewed-by Christian König <[email protected]>
Going to push that in a minute.
Thanks,
Christian.
Quoted 20 lines
--- drivers/gpu/drm/drm_syncobj.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_syncobj.c +3
-1@@ -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) {