]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu: jump to the correct label on failure
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 4 Nov 2025 09:42:45 +0000 (10:42 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 12 Nov 2025 03:49:46 +0000 (22:49 -0500)
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)

drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c

index f5d5c45ddc0d15b0e1789e7e6209f52e7786551a..afedea02188dd5f1d1c44bc92bf8aec98ef4a05d 100644 (file)
@@ -236,7 +236,7 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip,
                r = amdgpu_xcp_select_scheds(adev, hw_ip, hw_prio, fpriv,
                                                &num_scheds, &scheds);
                if (r)
-                       goto cleanup_entity;
+                       goto error_free_entity;
        }
 
        /* disable load balance if the hw engine retains context among dependent jobs */