mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 14:32:23 +00:00
iommu/dma: Use kvcalloc() instead of kvzalloc()
Use 2-factor argument form kvcalloc() instead of kvzalloc(). Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Acked-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20210928222229.GA280355@embeddedor Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
parent
2cbc61a1b1
commit
ab6f4b001c
@ -558,7 +558,7 @@ static struct page **__iommu_dma_alloc_pages(struct device *dev,
|
||||
if (!order_mask)
|
||||
return NULL;
|
||||
|
||||
pages = kvzalloc(count * sizeof(*pages), GFP_KERNEL);
|
||||
pages = kvcalloc(count, sizeof(*pages), GFP_KERNEL);
|
||||
if (!pages)
|
||||
return NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user