aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/cycx_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wan/cycx_main.c')
-rw-r--r--drivers/net/wan/cycx_main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wan/cycx_main.c b/drivers/net/wan/cycx_main.c
index 6e5f1c898517..a0e8611ad8e8 100644
--- a/drivers/net/wan/cycx_main.c
+++ b/drivers/net/wan/cycx_main.c
@@ -113,12 +113,10 @@ static int __init cycx_init(void)
113 /* Verify number of cards and allocate adapter data space */ 113 /* Verify number of cards and allocate adapter data space */
114 cycx_ncards = min_t(int, cycx_ncards, CYCX_MAX_CARDS); 114 cycx_ncards = min_t(int, cycx_ncards, CYCX_MAX_CARDS);
115 cycx_ncards = max_t(int, cycx_ncards, 1); 115 cycx_ncards = max_t(int, cycx_ncards, 1);
116 cycx_card_array = kmalloc(sizeof(struct cycx_device) * cycx_ncards, 116 cycx_card_array = kcalloc(cycx_ncards, sizeof(struct cycx_device), GFP_KERNEL);
117 GFP_KERNEL);
118 if (!cycx_card_array) 117 if (!cycx_card_array)
119 goto out; 118 goto out;
120 119
121 memset(cycx_card_array, 0, sizeof(struct cycx_device) * cycx_ncards);
122 120
123 /* Register adapters with WAN router */ 121 /* Register adapters with WAN router */
124 for (cnt = 0; cnt < cycx_ncards; ++cnt) { 122 for (cnt = 0; cnt < cycx_ncards; ++cnt) {