Skip to content

Commit

Permalink
drm/amdgpu: fix uninitialized scalar variable warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tim Huang authored and Alex Deucher committed Apr 26, 2024
1 parent 8e6a311 commit 9a5f15d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,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) {
Expand Down

0 comments on commit 9a5f15d

Please sign in to comment.