drm/amdgpu/gfx8: fix register_list_format leak in gfx_v8_0_init_microcode

gfx_v8_0_init_microcode() allocates rlc.register_list_format before
loading the MEC firmware.

If loading one of the subsequent firmware files fails, the function
returns through the error path without freeing register_list_format.

Use gfx_v8_0_free_microcode() in the error path so all previously
allocated firmware resources, including register_list_format, are
released.

Signed-off-by: Willian Oliveira <williandossantosdeoliveira287@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Willian Oliveira 2026-09-05 10:34:05 -03:00 • committed by Alex Deucher
commit 0a64c644a3