pm_runtime_put_autosuspend must be called from all exit paths.

Tested-by: Mario Limonciello <mario.limoncie...@amd.com>
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com>
---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c 
b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index d5d6ab484e5a..485672f3d6c5 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -1815,6 +1815,8 @@ static ssize_t amdgpu_set_apu_thermal_cap(struct device 
*dev,
 
        ret = amdgpu_dpm_set_apu_thermal_limit(adev, value);
        if (ret) {
+               pm_runtime_mark_last_busy(ddev->dev);
+               pm_runtime_put_autosuspend(ddev->dev);
                dev_err(dev, "failed to update thermal limit\n");
                return ret;
        }
-- 
2.40.1

Reply via email to