提交 41cc108b 编写于 作者: C Christian König

drm/amdgpu: fix missing dma_fence_put in error path

When the fence can't be added we need to drop the reference.
Suggested-by: NBert Karwatzki <spasswolf@web.de>
Signed-off-by: NChristian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230105111703.52695-2-christian.koenig@amd.comReviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: NLuben Tuikov <luben.tuikov@amd.com>
上级 ed21f6c3
...@@ -391,8 +391,10 @@ int amdgpu_sync_push_to_job(struct amdgpu_sync *sync, struct amdgpu_job *job) ...@@ -391,8 +391,10 @@ int amdgpu_sync_push_to_job(struct amdgpu_sync *sync, struct amdgpu_job *job)
dma_fence_get(f); dma_fence_get(f);
r = drm_sched_job_add_dependency(&job->base, f); r = drm_sched_job_add_dependency(&job->base, f);
if (r) if (r) {
dma_fence_put(f);
return r; return r;
}
} }
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册