Skip to content

Commit

Permalink
drm/amd/powerplay: Fix double unlock bug in smu_sys_set_pp_table()
Browse files Browse the repository at this point in the history
We already unlocked a few lines earlier so this code unlocks twice on
the success path.

Fixes: 289921b ("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>
  • Loading branch information
Dan Carpenter authored and Alex Deucher committed Mar 21, 2019
1 parent 8513027 commit 6c85141
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6c85141

Please sign in to comment.