From 5f6e5f638e1e420f73a173c6ad6b30eba1ab98fe Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Mon, 18 Apr 2016 16:58:55 -0400 Subject: [PATCH 1391/4131] Fix a memory leak in error handling Change-Id: I55da0b1e4d9fbac69ec8f8cc25c0551b0764884a --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c index b0430c1..8d421f5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c @@ -127,9 +127,9 @@ static int add_bo_to_vm(struct amdgpu_device *adev, uint64_t va, * list. amdgpu_vm_clear_freed needs the PTs to be reserved so * we don't call it here. That can wait until the next time * the page tables are updated for a map or unmap. */ - kfree(bo_va_entry); err_vmadd: amdgpu_bo_unreserve(bo); + kfree(bo_va_entry); return ret; } -- 2.7.4