diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2021-10-06 21:09:44 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-07 19:08:33 +0300 |
commit | 36371876e000012ae4440fcf3097c2f0ed0f83e7 (patch) | |
tree | e74b49a9fb4eecfd399d5b6997d02d87053624a7 | |
parent | 149ef7b2f949627bf3f1381d6a976f136a1887f5 (diff) | |
download | linux-36371876e000012ae4440fcf3097c2f0ed0f83e7.tar.xz |
net: stmmac: selftests: 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/20211006180944.GA913477@embeddedor
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c index 0462dcc93e53..e649a3e6a529 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c @@ -1104,13 +1104,13 @@ static int stmmac_test_rxp(struct stmmac_priv *priv) goto cleanup_sel; } - actions = kzalloc(nk * sizeof(*actions), GFP_KERNEL); + actions = kcalloc(nk, sizeof(*actions), GFP_KERNEL); if (!actions) { ret = -ENOMEM; goto cleanup_exts; } - act = kzalloc(nk * sizeof(*act), GFP_KERNEL); + act = kcalloc(nk, sizeof(*act), GFP_KERNEL); if (!act) { ret = -ENOMEM; goto cleanup_actions; |