Skip to content

Commit 10f950f

Browse files
committed
drm/amdgpu: fix locking in force performance level
Looks like a copy paste typo when we added powerplay support. Reviewed-by: Christian König <christian.koenig@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 04ab3b7 commit 10f950f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ static ssize_t amdgpu_set_dpm_forced_performance_level(struct device *dev,
157157
mutex_lock(&adev->pm.mutex);
158158
if (adev->pm.dpm.thermal_active) {
159159
count = -EINVAL;
160+
mutex_unlock(&adev->pm.mutex);
160161
goto fail;
161162
}
162163
ret = amdgpu_dpm_force_performance_level(adev, level);
@@ -167,8 +168,6 @@ static ssize_t amdgpu_set_dpm_forced_performance_level(struct device *dev,
167168
mutex_unlock(&adev->pm.mutex);
168169
}
169170
fail:
170-
mutex_unlock(&adev->pm.mutex);
171-
172171
return count;
173172
}
174173

0 commit comments

Comments
 (0)