aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2025-02-12 21:31:43 +0000
committerAlex Deucher <[email protected]>2025-02-17 19:08:53 +0000
commitc917e39cbdcd9fff421184db6cc461cc58d52c17 (patch)
tree9f6715fab6babd15a98bc185e06db4cff748d1d3 /drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
parentdrm/amdgpu: Remove extra checks for CPX (diff)
downloadkernel-c917e39cbdcd9fff421184db6cc461cc58d52c17.tar.gz
kernel-c917e39cbdcd9fff421184db6cc461cc58d52c17.zip
drm/amdgpu/umsch: fix ucode check
Return an error if the IP version doesn't match otherwise we end up passing a NULL string to amdgpu_ucode_request. We should never hit this in practice today since we only enable the umsch code on the supported IP versions, but add a check to be safe. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Fixes: 020620424b27 ("drm/amd: Use a constant format string for amdgpu_ucode_request") Reviewed-by: Saleemkhan Jamadar <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Lang Yu <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
index 78319988b054..a7f2648245ec 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
@@ -129,7 +129,7 @@ int amdgpu_umsch_mm_init_microcode(struct amdgpu_umsch_mm *umsch)
fw_name = "amdgpu/umsch_mm_4_0_0.bin";
break;
default:
- break;
+ return -EINVAL;
}
r = amdgpu_ucode_request(adev, &adev->umsch_mm.fw, AMDGPU_UCODE_REQUIRED,