Commit 6c851417 authored by Dan Carpenter's avatar Dan Carpenter Committed by Alex Deucher

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: 289921b0 ("drm/amd/powerplay: implement sysfs of pp_table for smu11 (v2)")
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarKevin Wang <kevin1.wang@amd.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8513027a
...@@ -187,6 +187,8 @@ int smu_sys_set_pp_table(struct smu_context *smu, void *buf, size_t size) ...@@ -187,6 +187,8 @@ int smu_sys_set_pp_table(struct smu_context *smu, void *buf, size_t size)
if (ret) if (ret)
pr_info("smu reset failed, ret = %d\n", ret); pr_info("smu reset failed, ret = %d\n", ret);
return ret;
failed: failed:
mutex_unlock(&smu->mutex); mutex_unlock(&smu->mutex);
return ret; return ret;
......
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