diff options
author | Chunming Zhou <David1.Zhou@amd.com> | 2016-07-28 17:20:32 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-08-09 17:31:49 -0400 |
commit | 64827adc9e14c8d17cf5f3d5a9ee47a42e95dd8c (patch) | |
tree | fc0d6f58e55badaa894dcdc89578de46b51ac1da /drivers/gpu | |
parent | b817634276f7f68c9d1d6d4a27117ff3c2f16956 (diff) |
drm/amdgpu: fix vm init error path
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 8e642fc48df4..80120fa4092c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -1535,7 +1535,7 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm) r = amd_sched_entity_init(&ring->sched, &vm->entity, rq, amdgpu_sched_jobs); if (r) - return r; + goto err; vm->page_directory_fence = NULL; @@ -1565,6 +1565,9 @@ error_free_page_directory: error_free_sched_entity: amd_sched_entity_fini(&ring->sched, &vm->entity); +err: + drm_free_large(vm->page_tables); + return r; } |