From baeb2ffab4e67bb9174e6166e070a9a8ec94b0f6 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 11 Aug 2010 07:02:48 +0000 Subject: 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 Acked-by: Gertjan van Wingerde Acked-by: Luciano Coelho Signed-off-by: David S. Miller --- drivers/net/myri10ge/myri10ge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/myri10ge') diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index fb2c0927d3cc..24ab8a43c777 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c @@ -3753,8 +3753,8 @@ static void myri10ge_probe_slices(struct myri10ge_priv *mgp) * slices. We give up on MSI-X if we can only get a single * vector. */ - mgp->msix_vectors = kzalloc(mgp->num_slices * - sizeof(*mgp->msix_vectors), GFP_KERNEL); + mgp->msix_vectors = kcalloc(mgp->num_slices, sizeof(*mgp->msix_vectors), + GFP_KERNEL); if (mgp->msix_vectors == NULL) goto disable_msix; for (i = 0; i < mgp->num_slices; i++) { -- cgit v1.2.2