diff options
| author | Chen Tao <[email protected]> | 2020-06-17 10:51:30 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2020-07-01 05:59:22 +0000 |
| commit | 888e32d71115e26b57bdcbc717c68e9c5026bac3 (patch) | |
| tree | 2764a5142feae52013b2fc10caf1002807a1cb86 /drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | |
| parent | drm/amdgpu/debugfs: fix memory leak when pm_runtime_get_sync failed (diff) | |
| download | kernel-888e32d71115e26b57bdcbc717c68e9c5026bac3.tar.gz kernel-888e32d71115e26b57bdcbc717c68e9c5026bac3.zip | |
drm/amdgpu/debugfs: fix memory leak when amdgpu_virt_enable_access_debugfs failed
Fix memory leak in amdgpu_debugfs_gpr_read not freeing data when
amdgpu_virt_enable_access_debugfs failed.
Fixes: 95a2f917387a2 ("drm/amdgpu: restrict debugfs register access under SR-IOV")
Signed-off-by: Chen Tao <[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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c index 3d0e8f8f733e..0ac9aab69497 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c @@ -941,7 +941,7 @@ static ssize_t amdgpu_debugfs_gpr_read(struct file *f, char __user *buf, r = amdgpu_virt_enable_access_debugfs(adev); if (r < 0) - return r; + goto err; /* switch to the specific se/sh/cu */ mutex_lock(&adev->grbm_idx_mutex); |
