aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/airo.c
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/wireless/airo.c
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/wireless/airo.c')
-rw-r--r--drivers/net/wireless/airo.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 1d05445d4ba3..7d26506957d7 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)
2723 if (ai->networks) 2723 if (ai->networks)
2724 return 0; 2724 return 0;
2725 2725
2726 ai->networks = 2726 ai->networks = kcalloc(AIRO_MAX_NETWORK_COUNT, sizeof(BSSListElement),
2727 kzalloc(AIRO_MAX_NETWORK_COUNT * sizeof(BSSListElement), 2727 GFP_KERNEL);
2728 GFP_KERNEL);
2729 if (!ai->networks) { 2728 if (!ai->networks) {
2730 airo_print_warn("", "Out of memory allocating beacons"); 2729 airo_print_warn("", "Out of memory allocating beacons");
2731 return -ENOMEM; 2730 return -ENOMEM;