Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Felix Kuehling and committed by
Alex Deucher
ca290da8 0596df6b

+1 -1
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
··· 2615 2615 goto error_free_root; 2616 2616 2617 2617 r = amdgpu_bo_kmap(vm->root.base.bo, NULL); 2618 + amdgpu_bo_unreserve(vm->root.base.bo); 2618 2619 if (r) 2619 2620 goto error_free_root; 2620 - amdgpu_bo_unreserve(vm->root.base.bo); 2621 2621 } 2622 2622 2623 2623 return 0;