drm/amd/powerplay: Fix double unlock bug in smu_sys_set_pp_table()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 21 Mar 2019 06:28:22 +0000 (09:28 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 21 Mar 2019 19:05:26 +0000 (14:05 -0500)
We already unlocked a few lines earlier so this code unlocks twice on
the success path.

Fixes: 289921b03fe5e ("drm/amd/powerplay: implement sysfs of pp_table for smu11 (v2)")
Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c

index 00b7c885772bc1a4e670d2bf1911ede5ed09c375..7e8c74da6a74499ea632a77c16b170b09ec6dae7 100644 (file)
@@ -187,6 +187,8 @@ int smu_sys_set_pp_table(struct smu_context *smu,  void *buf, size_t size)
        if (ret)
                pr_info("smu reset failed, ret = %d\n", ret);
 
+       return ret;
+
 failed:
        mutex_unlock(&smu->mutex);
        return ret;