[PATCH v2 1/2] drm/amdgpu/debugfs: fix memory leak when pm_runtime_get_sync failed

2020-06-17 Thread Chen Tao
Fix memory leak in amdgpu_debugfs_gpr_read not freeing data when pm_runtime_get_sync failed. Fixes: a9ffe2a983383 ("drm/amdgpu/debugfs: properly handle runtime pm") Signed-off-by: Chen Tao --- v1->v2: - remove the duplication of result and r here and then use "goto err"

[PATCH v2 2/2] drm/amdgpu/debugfs: fix memory leak when amdgpu_virt_enable_access_debugfs failed

2020-06-17 Thread Chen Tao
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 accessunder SR-IOV") Signed-off-by: Chen Tao --- v1->v2: - remove the duplication of result and r here and then

[PATCH 2/2] drm/amdgpu/debugfs: fix memory leak when amdgpu_virt_enable_access_debugfs failed

2020-06-16 Thread Chen Tao
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 accessunder SR-IOV") Signed-off-by: Chen Tao --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 +++- 1 file

[PATCH 1/2] drm/amdgpu/debugfs: fix memory leak when pm_runtime_get_sync failed

2020-06-16 Thread Chen Tao
Fix memory leak in amdgpu_debugfs_gpr_read not freeing data when pm_runtime_get_sync failed. Fixes: a9ffe2a983383 ("drm/amdgpu/debugfs: properly handle runtime pm") Signed-off-by: Chen Tao --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 +++- 1 file changed, 3 insertions(+),