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

drm/amdgpu: jump to the correct label on failure

drm_sched_entity_init wasn't called yet, so the only thing to
do is to release allocated memory.
This doesn't fix any bug since entity is zero allocated and
drm_sched_entity_fini does nothing in this case.

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit ec49374ccb8da86b465beaf09c367f3dfd648d8f)

authored by

Pierre-Eric Pelloux-Prayer and committed by
Alex Deucher
9f8fd538 22a36e66

+1 -1
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
··· 236 236 r = amdgpu_xcp_select_scheds(adev, hw_ip, hw_prio, fpriv, 237 237 &num_scheds, &scheds); 238 238 if (r) 239 - goto cleanup_entity; 239 + goto error_free_entity; 240 240 } 241 241 242 242 /* disable load balance if the hw engine retains context among dependent jobs */