summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2021-10-06 21:08:43 +0300
committerJakub Kicinski <kuba@kernel.org>2021-10-07 19:08:16 +0300
commit2b8a0f1516c6bf183e92f72943a37827047892ce (patch)
treeb2a2ba062d2964feaeff881c340ac012fe3e47d7 /drivers
parent44cc24b04bed578e32a4334cacf95799335b3274 (diff)
downloadlinux-2b8a0f1516c6bf183e92f72943a37827047892ce.tar.xz
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/broadcom/bcm4908_enet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bcm4908_enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c
index aa3b5672eab2..7cc5213c575a 100644
--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c
@@ -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;