Skip to content

Commit

Permalink
drm/amd/powerplay: fix locking in smu_feature_set_supported()
Browse files Browse the repository at this point in the history
There is a typo so the code unlocks twice instead of taking the lock and
then releasing it.

Fixes: f14a323 ("drm/amd/powerplay: implement update enabled feature state to smc for smu11")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Dan Carpenter authored and Alex Deucher committed May 20, 2019
1 parent 067e75b commit 029f415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ int smu_feature_set_supported(struct smu_context *smu, int feature_id,

WARN_ON(feature_id > feature->feature_num);

mutex_unlock(&feature->mutex);
mutex_lock(&feature->mutex);
if (enable)
test_and_set_bit(feature_id, feature->supported);
else
Expand Down

0 comments on commit 029f415

Please sign in to comment.