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: Bert Karwatzki <spasswolf@web.de> Signed-off-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230105111703.52695-2-christian.koenig@amd.com Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Luben Tuikov <luben.tuikov@amd.com>
This commit is contained in:
parent
ed21f6c3fe
commit
41cc108b24
@ -391,8 +391,10 @@ int amdgpu_sync_push_to_job(struct amdgpu_sync *sync, struct amdgpu_job *job)
|
||||
|
||||
dma_fence_get(f);
|
||||
r = drm_sched_job_add_dependency(&job->base, f);
|
||||
if (r)
|
||||
if (r) {
|
||||
dma_fence_put(f);
|
||||
return r;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user