Commit fb1155a9 authored by Oded Gabbay's avatar Oded Gabbay

habanalabs: use kvcalloc when possible

kvcalloc is same as kvmalloc_array with GFP_ZERO.
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent b63539a6
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment