mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
nouveau/vmm: use kzalloc_flex
Use the proper macro do to these sizeof calculations. Signed-off-by: Rosen Penev <rosenp@gmail.com> Reviewed-by: Lyude Paul <lyude@redhat.com> [fixed style warning from checkpatch] Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patch.msgid.link/20260312195529.13002-1-rosenp@gmail.com
This commit is contained in:
parent
50e13e0edb
commit
cf0ba1ad14
|
|
@ -53,7 +53,8 @@ nvkm_vmm_pt_new(const struct nvkm_vmm_desc *desc, bool sparse,
|
|||
}
|
||||
}
|
||||
|
||||
if (!(pgt = kzalloc(sizeof(*pgt) + (sizeof(pgt->pte[0]) * lpte), GFP_KERNEL)))
|
||||
pgt = kzalloc_flex(*pgt, pte, lpte);
|
||||
if (!pgt)
|
||||
return NULL;
|
||||
pgt->page = page ? page->shift : 0;
|
||||
pgt->sparse = sparse;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user