Fix AMD-SMI test segmentation fault TestGpuMetricsRead

Issue: need to return on any failure.
The nullptr check test would segfault without-
all values in struct are not initialized.

Signed-off-by: Charis Poag <Charis.Poag@amd.com>
Change-Id: I4987fb73ba9bcb182de7a439a4286333a41bf7eb


[ROCm/amdsmi commit: d74be3120e]
Tá an tiomantas seo le fáil i:
Charis Poag tiomanta 2024-01-14 19:27:34 -06:00
1 tuismitheoir 64969f2c61
tiomantas 31081fa8b0
1 comhad athraithe
+3
+3
Féach ar an gComhad
@@ -1084,6 +1084,9 @@ amdsmi_status_t amdsmi_get_gpu_metrics_info(
amdsmi_status_t ret =
rsmi_wrapper(rsmi_dev_gpu_metrics_info_get, processor_handle,
reinterpret_cast<rsmi_gpu_metrics_t*>(pgpu_metrics));
if (ret != AMDSMI_STATUS_SUCCESS) {
return ret;
}
// WARNING: TEMPORARY - awaiting 1.5 update from amdgpu driver/firmware
// intended to be removed later
// START: REMOVE WHATS BELOW ME