Skip to content

Commit f2b099e

Browse files
alexdeuchergregkh
authored andcommitted
drm/amdgpu/umsch: fix ucode check
[ Upstream commit c917e39 ] 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 <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202502130406.iWQ0eBug-lkp@intel.com/ Fixes: 0206204 ("drm/amd: Use a constant format string for amdgpu_ucode_request") Reviewed-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Lang Yu <Lang.Yu@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 2dbf9e3 commit f2b099e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ int amdgpu_umsch_mm_init_microcode(struct amdgpu_umsch_mm *umsch)
584584
fw_name = "amdgpu/umsch_mm_4_0_0.bin";
585585
break;
586586
default:
587-
break;
587+
return -EINVAL;
588588
}
589589

590590
r = amdgpu_ucode_request(adev, &adev->umsch_mm.fw, "%s", fw_name);

0 commit comments

Comments
 (0)