[SWDEV-524528] Nullptr check correction for TestErrCntRead (#211)

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I1331a69544a6f5b7b61ea4655b635b42bbb56444

[ROCm/amdsmi commit: 13c222a103]
This commit is contained in:
Arif, Maisam
2025-03-28 11:18:22 -05:00
committed by GitHub
+4 -2
View File
@@ -643,8 +643,6 @@ rsmi_dev_ecc_count_get(uint32_t dv_ind, rsmi_gpu_block_t block,
TRY
ss << __PRETTY_FUNCTION__ << "| ======= start =======";
LOG_TRACE(ss);
CHK_SUPPORT_VAR(ec, block)
amd::smi::DevInfoTypes type;
switch (block) {
@@ -704,6 +702,10 @@ rsmi_dev_ecc_count_get(uint32_t dv_ind, rsmi_gpu_block_t block,
return ret;
}
if (ec == nullptr) {
return RSMI_STATUS_INVALID_ARGS;
}
std::string junk;
std::istringstream fs1(val_vec[0]);