Skip to content

Commit 9a5f15d

Browse files
Tim Huangalexdeucher
authored andcommitted
drm/amdgpu: fix uninitialized scalar variable warning
Clear warning that uses uninitialized value fw_size. Signed-off-by: Tim Huang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 8e6a311 commit 9a5f15d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)