summaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/en_rx.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-08-11 07:02:48 +0000
committerDavid S. Miller <davem@davemloft.net>2010-08-17 17:45:14 -0700
commitbaeb2ffab4e67bb9174e6166e070a9a8ec94b0f6 (patch)
tree08259e966cc0cacc58ed58a4865fe861cc255241 /drivers/net/mlx4/en_rx.c
parent5a68d5ee000bb784c4856391b4861739c8bbd341 (diff)
downloadblackbird-op-linux-baeb2ffab4e67bb9174e6166e070a9a8ec94b0f6.tar.gz
blackbird-op-linux-baeb2ffab4e67bb9174e6166e070a9a8ec94b0f6.zip
drivers/net: Convert unbounded kzalloc calls to kcalloc
These changes may be slightly safer in some instances. There are other kzalloc calls with a multiply, but those calls are typically "small fixed #" * sizeof(some pointer)" and those are not converted. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mlx4/en_rx.c')
-rw-r--r--drivers/net/mlx4/en_rx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c
index 8e2fcb7103c3..efc3fad468db 100644
--- a/drivers/net/mlx4/en_rx.c
+++ b/drivers/net/mlx4/en_rx.c
@@ -322,7 +322,7 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv,
ring->lro.ip_summed_aggr = CHECKSUM_UNNECESSARY;
ring->lro.max_desc = mdev->profile.num_lro;
ring->lro.max_aggr = MAX_SKB_FRAGS;
- ring->lro.lro_arr = kzalloc(mdev->profile.num_lro *
+ ring->lro.lro_arr = kcalloc(mdev->profile.num_lro,
sizeof(struct net_lro_desc),
GFP_KERNEL);
if (!ring->lro.lro_arr) {
OpenPOWER on IntegriCloud