Commit 10f950f6 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu: fix locking in force performance level

Looks like a copy paste typo when we added powerplay
support.
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 04ab3b76
...@@ -157,6 +157,7 @@ static ssize_t amdgpu_set_dpm_forced_performance_level(struct device *dev, ...@@ -157,6 +157,7 @@ static ssize_t amdgpu_set_dpm_forced_performance_level(struct device *dev,
mutex_lock(&adev->pm.mutex); mutex_lock(&adev->pm.mutex);
if (adev->pm.dpm.thermal_active) { if (adev->pm.dpm.thermal_active) {
count = -EINVAL; count = -EINVAL;
mutex_unlock(&adev->pm.mutex);
goto fail; goto fail;
} }
ret = amdgpu_dpm_force_performance_level(adev, level); ret = amdgpu_dpm_force_performance_level(adev, level);
...@@ -167,8 +168,6 @@ static ssize_t amdgpu_set_dpm_forced_performance_level(struct device *dev, ...@@ -167,8 +168,6 @@ static ssize_t amdgpu_set_dpm_forced_performance_level(struct device *dev,
mutex_unlock(&adev->pm.mutex); mutex_unlock(&adev->pm.mutex);
} }
fail: fail:
mutex_unlock(&adev->pm.mutex);
return count; return count;
} }
......
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