aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/myri10ge
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-08-11 03:02:48 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-17 20:45:14 -0400
commitbaeb2ffab4e67bb9174e6166e070a9a8ec94b0f6 (patch)
tree08259e966cc0cacc58ed58a4865fe861cc255241 /drivers/net/myri10ge
parent5a68d5ee000bb784c4856391b4861739c8bbd341 (diff)
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/myri10ge')
-rw-r--r--drivers/net/myri10ge/myri10ge.c4
1 files changed, 2 insertions, 2 deletions
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)
3753 * slices. We give up on MSI-X if we can only get a single 3753 * slices. We give up on MSI-X if we can only get a single
3754 * vector. */ 3754 * vector. */
3755 3755
3756 mgp->msix_vectors = kzalloc(mgp->num_slices * 3756 mgp->msix_vectors = kcalloc(mgp->num_slices, sizeof(*mgp->msix_vectors),
3757 sizeof(*mgp->msix_vectors), GFP_KERNEL); 3757 GFP_KERNEL);
3758 if (mgp->msix_vectors == NULL) 3758 if (mgp->msix_vectors == NULL)
3759 goto disable_msix; 3759 goto disable_msix;
3760 for (i = 0; i < mgp->num_slices; i++) { 3760 for (i = 0; i < mgp->num_slices; i++) {