From: Christian König Date: Sat, 31 May 2014 18:38:34 +0000 (+0200) Subject: drm/radeon: fix vm buffer size estimation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2f93dc32b09a2c97f6f33bafe4c6bdcec7cae774;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drm/radeon: fix vm buffer size estimation Only relevant if we got VM_BLOCK_SIZE>9, but better save than sorry. Signed-off-by: Christian König --- diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c index 1f426696de36..1491be90755e 100644 --- a/drivers/gpu/drm/radeon/radeon_vm.c +++ b/drivers/gpu/drm/radeon/radeon_vm.c @@ -132,7 +132,7 @@ struct radeon_cs_reloc *radeon_vm_get_bos(struct radeon_device *rdev, struct radeon_cs_reloc *list; unsigned i, idx; - list = kmalloc_array(vm->max_pde_used + 1, + list = kmalloc_array(vm->max_pde_used + 2, sizeof(struct radeon_cs_reloc), GFP_KERNEL); if (!list) return NULL;