diff options
| author | Yongzhi Liu <[email protected]> | 2022-01-18 20:11:51 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-01-18 22:43:36 +0000 |
| commit | 4bd8dd0d61f961e6c13cc118d4ebbdba57f8561f (patch) | |
| tree | 026ef0e2b6fe0d0c302082bccdc5a333b75d4d7c /drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | |
| parent | drm/amd/display: move calcs folder into DML (diff) | |
| download | kernel-4bd8dd0d61f961e6c13cc118d4ebbdba57f8561f.tar.gz kernel-4bd8dd0d61f961e6c13cc118d4ebbdba57f8561f.zip | |
drm/amdgpu: Add missing pm_runtime_put_autosuspend
pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code, thus a matching decrement is needed
on the error handling path to keep the counter balanced.
Signed-off-by: Yongzhi Liu <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c index 9aea1cc5b27e..4b950de9bf66 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c @@ -1120,8 +1120,10 @@ static ssize_t amdgpu_debugfs_gfxoff_read(struct file *f, char __user *buf, return -EINVAL; r = pm_runtime_get_sync(adev_to_drm(adev)->dev); - if (r < 0) + if (r < 0) { + pm_runtime_put_autosuspend(adev_to_drm(adev)->dev); return r; + } while (size) { uint32_t value; |
