drm/amd/powerplay: Fix double unlock bug in smu_sys_set_pp_table()

We already unlocked a few lines earlier so this code unlocks twice on
the success path.

Fixes: 289921b03f ("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>
This commit is contained in:
Dan Carpenter 2019-03-21 09:28:22 +03:00 committed by Alex Deucher
parent 8513027a73
commit 6c85141733

View 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;