]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: fix uninit-value in arcturus_log_thermal_throttling_event()
authorKevin Wang <kevin1.wang@amd.com>
Thu, 6 Aug 2020 15:41:47 +0000 (23:41 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 18 Aug 2020 20:59:26 +0000 (16:59 -0400)
commita180d49f66a148a28c8eaa6b7294cc3485f65426
tree51cd41f764faf9bf15284a2ab0cf376339ba276b
parent836e93bf0abddb28a2baeb282fc34f96d62384c6
drm/amdgpu: fix uninit-value in arcturus_log_thermal_throttling_event()

when function arcturus_get_smu_metrics_data() call failed,
it will cause the variable "throttler_status" isn't initialized before use.

warning:
powerplay/arcturus_ppt.c:2268:24: warning: ‘throttler_status’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 2268 |   if (throttler_status & logging_label[throttler_idx].feature_mask) {

Signed-off-by: Kevin Wang <kevin1.wang@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