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: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
99698b51e5
commit
b4339bb9a4
|
@ -410,6 +410,8 @@ static int vangogh_get_current_activity_percent(struct smu_context *smu,
|
|||
ret = vangogh_get_smu_metrics_data(smu,
|
||||
METRICS_AVERAGE_GFXACTIVITY,
|
||||
value);
|
||||
if (ret)
|
||||
return ret;
|
||||
break;
|
||||
default:
|
||||
dev_err(smu->adev->dev, "Invalid sensor for retrieving clock activity\n");
|
||||
|
|
Loading…
Reference in New Issue