diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 2e26ff44..b0c864d4 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -873,6 +873,12 @@ static void gk20a_vm_unmap_user(struct vm_gk20a *vm, u64 offset, | |||
873 | mutex_lock(&vm->update_gmmu_lock); | 873 | mutex_lock(&vm->update_gmmu_lock); |
874 | } | 874 | } |
875 | 875 | ||
876 | if (mapped_buffer->user_mapped == 0) { | ||
877 | mutex_unlock(&vm->update_gmmu_lock); | ||
878 | gk20a_err(d, "addr already unmapped from user 0x%llx", offset); | ||
879 | return; | ||
880 | } | ||
881 | |||
876 | mapped_buffer->user_mapped--; | 882 | mapped_buffer->user_mapped--; |
877 | if (mapped_buffer->user_mapped == 0) | 883 | if (mapped_buffer->user_mapped == 0) |
878 | vm->num_user_mapped_buffers--; | 884 | vm->num_user_mapped_buffers--; |