]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/amd/powerplay: fix locking in smu_feature_set_supported()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 15 May 2019 09:51:30 +0000 (12:51 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 20 May 2019 17:56:05 +0000 (12:56 -0500)
There is a typo so the code unlocks twice instead of taking the lock and
then releasing it.

Fixes: f14a323db5b0 ("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>
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c

index c058c784180eecf8daab0840ec5ee8120fd6f296..eec329ab6037039d2a5853e0c914b5f48284b278 100644 (file)
@@ -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