Commit 029f4153 authored by Dan Carpenter's avatar Dan Carpenter Committed by Alex Deucher

drm/amd/powerplay: fix locking in smu_feature_set_supported()

There is a typo so the code unlocks twice instead of taking the lock and
then releasing it.

Fixes: f14a323d ("drm/amd/powerplay: implement update enabled feature state to smc for smu11")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 067e75b3
......@@ -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
......
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