From 5c27c7d40c1fe8ac72432e4ae950954cc9cc20a1 Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 12 Jul 2024 04:01:39 +0000 Subject: [PATCH] drm/amdgpu: fix uninitialized scalar variable warning From Tim Huang 7e0fbceae1e671af9d91e338cc8608c9bfb7d2f1 in linux-6.6.y/6.6.39 9a5f15d2a29d06ce5bd50919da7221cda92afb69 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_gfx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_gfx.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_gfx.c index 43557188177..c4b554486c7 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_gfx.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_gfx.c @@ -1187,7 +1187,8 @@ void amdgpu_gfx_cp_init_microcode(struct amdgpu_device *adev, fw_size = le32_to_cpu(cp_hdr_v2_0->data_size_bytes); break; default: - break; + dev_err(adev->dev, "Invalid ucode id %u\n", ucode_id); + return; } if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) { -- 2.20.1