[PATCH 2/2] drm/amdgpu: fix missing dma_fence_put in error path
Luben Tuikov
luben.tuikov at amd.com
Thu Jan 5 16:12:10 UTC 2023
Series is:
Reviewed-by: Luben Tuikov <luben.tuikov at amd.com>
Regards,
Luben
On 2023-01-05 06:17, Christian König wrote:
> When the fence can't be added we need to drop the reference.
>
> Suggested-by: Bert Karwatzki <spasswolf at web.de>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> 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;
> }
More information about the amd-gfx
mailing list