diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_allocator.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c index b404799f..0b5f9f6f 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_allocator.c | |||
@@ -89,8 +89,10 @@ int gk20a_allocator_block_alloc(struct gk20a_allocator *allocator, | |||
89 | len, | 89 | len, |
90 | allocator->align - 1); | 90 | allocator->align - 1); |
91 | if ((_addr > allocator->limit - allocator->base + 1) || | 91 | if ((_addr > allocator->limit - allocator->base + 1) || |
92 | (*addr && *addr != (_addr + allocator->base))) | 92 | (*addr && *addr != (_addr + allocator->base))) { |
93 | up_write(&allocator->rw_sema); | ||
93 | return -ENOMEM; | 94 | return -ENOMEM; |
95 | } | ||
94 | 96 | ||
95 | bitmap_set(allocator->bitmap, _addr, len); | 97 | bitmap_set(allocator->bitmap, _addr, len); |
96 | *addr = allocator->base + _addr; | 98 | *addr = allocator->base + _addr; |