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

2020-06-16 Thread Markus Elfring
> Fix memory leak in amdgpu_debugfs_gpr_read not freeing data when > pm_runtime_get_sync failed. * Would you like to improve the exception handling any more for this software module? * How do you think about calling the function “pm_runtime_put_noidle”? Regards, Markus

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

2020-06-16 Thread chentao (AS)
Ok, i will modify it in v2 patch. On 2020/6/16 14:50, Christian König wrote: Probably better to remove the duplication of result and r here and then use "goto err".

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

2020-06-16 Thread Christian König
Am 16.06.20 um 08:30 schrieb 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 Probably better to remove the duplication of result and r here

[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(+), 1 deletion(-)