diff options
| author | Christian König <[email protected]> | 2023-01-05 10:27:16 +0000 |
|---|---|---|
| committer | Christian König <[email protected]> | 2023-01-05 19:34:58 +0000 |
| commit | 41cc108b2451e0c65e8c9c9f6a3e103b62b60bb3 (patch) | |
| tree | 7e5d13ed11f1e8397d5b7ed3bdfe7860955c1d55 /drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | |
| parent | drm/amdgpu: fix another missing fence reference in the CS code (diff) | |
| download | kernel-41cc108b2451e0c65e8c9c9f6a3e103b62b60bb3.tar.gz kernel-41cc108b2451e0c65e8c9c9f6a3e103b62b60bb3.zip | |
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 <[email protected]>
Signed-off-by: Christian König <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Alex Deucher <[email protected]>
Reviewed-by: Luben Tuikov <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c index bac7976975bd..dcd8c066bc1f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c @@ -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; } |
