drm/amdgpu/powerplay: fix locking typo
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 31 Mar 2017 14:51:29 +0000 (10:51 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 4 Apr 2017 17:40:30 +0000 (13:40 -0400)
Fixes: 2a5071056e6a601e ("drm/amd/powerplay: add global PowerPlay mutex.")
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/amd_powerplay.c

index dfd4fe6..6f0ed07 100644 (file)
@@ -894,7 +894,7 @@ static int pp_dpm_set_sclk_od(void *handle, uint32_t value)
 
        mutex_lock(&pp_handle->pp_lock);
        ret = hwmgr->hwmgr_func->set_sclk_od(hwmgr, value);
-       mutex_lock(&pp_handle->pp_lock);
+       mutex_unlock(&pp_handle->pp_lock);
        return ret;
 }