Skip to content

Commit 9a5f15d

Browse files
timhuang-amdalexdeucher
authored andcommitted
drm/amdgpu: fix uninitialized scalar variable warning
Clear warning that uses uninitialized value fw_size. Signed-off-by: Tim Huang <Tim.Huang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 8e6a311 commit 9a5f15d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,8 @@ void amdgpu_gfx_cp_init_microcode(struct amdgpu_device *adev,
12061206
fw_size = le32_to_cpu(cp_hdr_v2_0->data_size_bytes);
12071207
break;
12081208
default:
1209-
break;
1209+
dev_err(adev->dev, "Invalid ucode id %u\n", ucode_id);
1210+
return;
12101211
}
12111212

12121213
if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {

0 commit comments

Comments
 (0)