Commit 41cc108b authored by Christian König's avatar 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: default avatarBert Karwatzki <spasswolf@web.de>
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230105111703.52695-2-christian.koenig@amd.comReviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
parent ed21f6c3
......@@ -391,9 +391,11 @@ 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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment