drm/powerplay: fix compilation warning
authorNirmoy Das <nirmoy.das@amd.com>
Mon, 22 Jun 2020 19:50:40 +0000 (21:50 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2020 05:59:26 +0000 (01:59 -0400)
If (smu)->ppt_funcs->intf is not initialized then
smu_send_smc_msg(smu, SMU_MSG_ReadSerialNumBottom32, &bottom32) and
smu_send_smc_msg(smu, SMU_MSG_ReadSerialNumTop32, &top32) will not
touch bottom32 and top32.

Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c

index b27d0b18eafa1fd7f59bec4268e2247cb5067995..d93f8a43a96ff116141f69f1a1204236ea645bce 100644 (file)
@@ -2371,7 +2371,7 @@ static void arcturus_i2c_eeprom_control_fini(struct smu_context *smu, struct i2c
 static void arcturus_get_unique_id(struct smu_context *smu)
 {
        struct amdgpu_device *adev = smu->adev;
-       uint32_t top32, bottom32, smu_version;
+       uint32_t top32 = 0, bottom32 = 0, smu_version;
        uint64_t id;
 
        if (smu_get_smc_version(smu, NULL, &smu_version)) {