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/wireless/airo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/net/wireless/airo.c') diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 1d05445d4ba..7d26506957d 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -2723,9 +2723,8 @@ static int airo_networks_allocate(struct airo_info *ai) if (ai->networks) return 0; - ai->networks = - kzalloc(AIRO_MAX_NETWORK_COUNT * sizeof(BSSListElement), - GFP_KERNEL); + ai->networks = kcalloc(AIRO_MAX_NETWORK_COUNT, sizeof(BSSListElement), + GFP_KERNEL); if (!ai->networks) { airo_print_warn("", "Out of memory allocating beacons"); return -ENOMEM; -- cgit v1.2.3-70-g09d2