Commit 2b8a0f15 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Jakub Kicinski

net: broadcom: bcm4908_enet: use kcalloc() instead of kzalloc()

Use 2-factor multiplication argument form kcalloc() instead
of kzalloc().

Link: https://github.com/KSPP/linux/issues/162Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20211006180843.GA913399@embeddedorSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 44cc24b0
......@@ -170,7 +170,7 @@ static int bcm4908_dma_alloc_buf_descs(struct bcm4908_enet *enet,
goto err_free_buf_descs;
}
ring->slots = kzalloc(ring->length * sizeof(*ring->slots), GFP_KERNEL);
ring->slots = kcalloc(ring->length, sizeof(*ring->slots), GFP_KERNEL);
if (!ring->slots)
goto err_free_buf_descs;
......
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