drm/amdgpu: fix uninitialized scalar variable warning
authorjsg <jsg@openbsd.org>
Fri, 12 Jul 2024 04:01:39 +0000 (04:01 +0000)
committerjsg <jsg@openbsd.org>
Fri, 12 Jul 2024 04:01:39 +0000 (04:01 +0000)
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

index 4355718..c4b5544 100644 (file)
@@ -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) {