diff options
author | Felix Kuehling <Felix.Kuehling@amd.com> | 2017-08-25 20:15:04 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 13:07:01 -0400 |
commit | ca290da8f6345c8e8e180256fbe092c751fa9654 (patch) | |
tree | 787da6e464098c1afd94c3e17f741c24329af6ca /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
parent | 0596df6b09cf652844eb08c917da94984177846b (diff) |
drm/amdgpu: Fix error handling in amdgpu_vm_init
Make sure vm->root.bo is not left reserved if amdgpu_bo_kmap fails.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 2df254cc802e..2196bca7331c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |||
@@ -2615,9 +2615,9 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm, | |||
2615 | goto error_free_root; | 2615 | goto error_free_root; |
2616 | 2616 | ||
2617 | r = amdgpu_bo_kmap(vm->root.base.bo, NULL); | 2617 | r = amdgpu_bo_kmap(vm->root.base.bo, NULL); |
2618 | amdgpu_bo_unreserve(vm->root.base.bo); | ||
2618 | if (r) | 2619 | if (r) |
2619 | goto error_free_root; | 2620 | goto error_free_root; |
2620 | amdgpu_bo_unreserve(vm->root.base.bo); | ||
2621 | } | 2621 | } |
2622 | 2622 | ||
2623 | return 0; | 2623 | return 0; |