Skip to content

Commit b0fca32

Browse files
peppsacalexdeucher
authored andcommitted
drm/amd/pm: fix rpm refcount handling on error
pm_runtime_put_autosuspend must be called from all exit paths. Tested-by: Mario Limonciello <[email protected]> Reviewed-by: Kenneth Feng <[email protected]> Signed-off-by: Pierre-Eric Pelloux-Prayer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent e15ec81 commit b0fca32

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpu/drm/amd/pm/amdgpu_pm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,6 +1815,8 @@ static ssize_t amdgpu_set_apu_thermal_cap(struct device *dev,
18151815

18161816
ret = amdgpu_dpm_set_apu_thermal_limit(adev, value);
18171817
if (ret) {
1818+
pm_runtime_mark_last_busy(ddev->dev);
1819+
pm_runtime_put_autosuspend(ddev->dev);
18181820
dev_err(dev, "failed to update thermal limit\n");
18191821
return ret;
18201822
}

0 commit comments

Comments
 (0)