Commit b4339bb9 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/swsmu/vangogh: return error if fetching metrics fails

rather than just dropping the error.  Also fixes a set but not
used variable warning.
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 99698b51
...@@ -410,6 +410,8 @@ static int vangogh_get_current_activity_percent(struct smu_context *smu, ...@@ -410,6 +410,8 @@ static int vangogh_get_current_activity_percent(struct smu_context *smu,
ret = vangogh_get_smu_metrics_data(smu, ret = vangogh_get_smu_metrics_data(smu,
METRICS_AVERAGE_GFXACTIVITY, METRICS_AVERAGE_GFXACTIVITY,
value); value);
if (ret)
return ret;
break; break;
default: default:
dev_err(smu->adev->dev, "Invalid sensor for retrieving clock activity\n"); dev_err(smu->adev->dev, "Invalid sensor for retrieving clock activity\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment