drm/amdgpu: Fix the null pointer when load rlc firmware
authorMa Jun <Jun.Ma2@amd.com>
Fri, 12 Jan 2024 05:33:24 +0000 (13:33 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Jan 2024 21:34:45 +0000 (16:34 -0500)
commitbc03c02cc1991a066b23e69bbcc0f66e8f1f7453
tree691e67a326aa3093df8623d53f919230e4207fec
parentbfe79f5fff1300d96203383582b078c7b0aec80a
drm/amdgpu: Fix the null pointer when load rlc firmware

If the RLC firmware is invalid because of wrong header size,
the pointer to the rlc firmware is released in function
amdgpu_ucode_request. There will be a null pointer error
in subsequent use. So skip validation to fix it.

Fixes: 3da9b71563cb ("drm/amd: Use `amdgpu_ucode_*` helpers for GFX10")
Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c