Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99147e64 authored by Dan Carpenter's avatar Dan Carpenter Committed by Alex Deucher
Browse files

drm/amd/powerplay: fix a couple locking issues



We should return unlock on the error path in pp_dpm_dispatch_tasks()
and there is a double lock bug in pp_dpm_set_sclk_od().

Fixes: 2a507105 ("drm/amd/powerplay: add global PowerPlay mutex.")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0f987cd0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -493,8 +493,10 @@ static int pp_dpm_dispatch_tasks(void *handle, enum amd_pp_event event_id,
	{
		enum amd_pm_state_type  ps;

		if (input == NULL)
			return -EINVAL;
		if (input == NULL) {
			ret = -EINVAL;
			break;
		}
		ps = *(unsigned long *)input;

		data.requested_ui_label = power_state_convert(ps);