diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/mm')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/vm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/vm.c b/drivers/gpu/nvgpu/common/mm/vm.c index 4e221500..dc928e18 100644 --- a/drivers/gpu/nvgpu/common/mm/vm.c +++ b/drivers/gpu/nvgpu/common/mm/vm.c | |||
@@ -755,6 +755,11 @@ int nvgpu_vm_get_buffers(struct vm_gk20a *vm, | |||
755 | 755 | ||
756 | nvgpu_mutex_acquire(&vm->update_gmmu_lock); | 756 | nvgpu_mutex_acquire(&vm->update_gmmu_lock); |
757 | 757 | ||
758 | if (vm->num_user_mapped_buffers == 0) { | ||
759 | nvgpu_mutex_release(&vm->update_gmmu_lock); | ||
760 | return 0; | ||
761 | } | ||
762 | |||
758 | buffer_list = nvgpu_big_zalloc(vm->mm->g, sizeof(*buffer_list) * | 763 | buffer_list = nvgpu_big_zalloc(vm->mm->g, sizeof(*buffer_list) * |
759 | vm->num_user_mapped_buffers); | 764 | vm->num_user_mapped_buffers); |
760 | if (buffer_list == NULL) { | 765 | if (buffer_list == NULL) { |