[PATCH] drm/amdgpu: fix uninitialized scalar variable warning
Tim Huang
Tim.Huang at amd.com
Tue Apr 23 06:28:53 UTC 2024
Clear warning that uses uninitialized value fw_size.
Signed-off-by: Tim Huang <Tim.Huang at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
index d95555dc5485..6b8a58f501d3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
@@ -1084,7 +1084,7 @@ void amdgpu_gfx_cp_init_microcode(struct amdgpu_device *adev,
const struct gfx_firmware_header_v2_0 *cp_hdr_v2_0;
struct amdgpu_firmware_info *info = NULL;
const struct firmware *ucode_fw;
- unsigned int fw_size;
+ unsigned int fw_size = 0;
switch (ucode_id) {
case AMDGPU_UCODE_ID_CP_PFP:
--
2.39.2
More information about the amd-gfx
mailing list