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/162 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20211006180843.GA913399@embeddedor Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
44cc24b04b
commit
2b8a0f1516
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user