if ((reg_entry->flags & AMDGPU_RAS_ERR_INFO_VALID) &&
!REG_GET_FIELD(err_status_hi_data, ERR_STATUS_HI, ERR_INFO_VALID_FLAG))
- return false;
+ /* keep the check here in case we need to refer to the result later */
+ dev_dbg(adev->dev, "Invalid err_info field\n");
/* read err count */
*err_cnt = REG_GET_FIELD(err_status_hi_data, ERR_STATUS, ERR_CNT);
uint32_t i, j;
for (i = 0; i < reg_list_size; i++) {
+ /* query memory_id from err_status_lo */
+ if (!amdgpu_ras_inst_get_memory_id_field(adev, ®_list[i],
+ instance, &memory_id))
+ continue;
+
/* query err_cnt from err_status_hi */
if (!amdgpu_ras_inst_get_err_cnt_field(adev, ®_list[i],
instance, &err_cnt) ||
!err_cnt)
continue;
- /* query memory_id from err_status_lo */
- if (!amdgpu_ras_inst_get_memory_id_field(adev, ®_list[i],
- instance, &memory_id))
- continue;
-
*err_count += err_cnt;
/* log the errors */