habanalabs: use kvcalloc when possible
kvcalloc is same as kvmalloc_array with GFP_ZERO. Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
parent
b63539a6fa
commit
fb1155a9f0
@ -393,9 +393,8 @@ static int hl_mmu_v1_init(struct hl_device *hdev)
|
||||
goto err_pool_add;
|
||||
}
|
||||
|
||||
hdev->mmu_priv.dr.mmu_shadow_hop0 = kvmalloc_array(prop->max_asid,
|
||||
prop->mmu_hop_table_size,
|
||||
GFP_KERNEL | __GFP_ZERO);
|
||||
hdev->mmu_priv.dr.mmu_shadow_hop0 = kvcalloc(prop->max_asid, prop->mmu_hop_table_size,
|
||||
GFP_KERNEL);
|
||||
if (ZERO_OR_NULL_PTR(hdev->mmu_priv.dr.mmu_shadow_hop0)) {
|
||||
rc = -ENOMEM;
|
||||
goto err_pool_add;
|
||||
|
Loading…
x
Reference in New Issue
Block a user