Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+3 -1
+3 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
··· 391 391 392 392 dma_fence_get(f); 393 393 r = drm_sched_job_add_dependency(&job->base, f); 394 - if (r) 394 + if (r) { 395 + dma_fence_put(f); 395 396 return r; 397 + } 396 398 } 397 399 return 0; 398 400 }