Commit b0fca327 authored by Pierre-Eric Pelloux-Prayer's avatar Pierre-Eric Pelloux-Prayer Committed by Alex Deucher
Browse files

drm/amd/pm: fix rpm refcount handling on error



pm_runtime_put_autosuspend must be called from all exit paths.

Tested-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Reviewed-by: default avatarKenneth Feng <kenneth.feng@amd.com>
Signed-off-by: default avatarPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e15ec812
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
	}