aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap/hostap_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_info.c')
-rw-r--r--drivers/net/wireless/hostap/hostap_info.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/hostap/hostap_info.c b/drivers/net/wireless/hostap/hostap_info.c
index 50f72d831cf4..00ed6389076b 100644
--- a/drivers/net/wireless/hostap/hostap_info.c
+++ b/drivers/net/wireless/hostap/hostap_info.c
@@ -327,11 +327,10 @@ static void prism2_info_hostscanresults(local_info_t *local,
327 ptr = (u8 *) pos; 327 ptr = (u8 *) pos;
328 328
329 new_count = left / result_size; 329 new_count = left / result_size;
330 results = kmalloc(new_count * sizeof(struct hfa384x_hostscan_result), 330 results = kcalloc(new_count, sizeof(struct hfa384x_hostscan_result),
331 GFP_ATOMIC); 331 GFP_ATOMIC);
332 if (results == NULL) 332 if (results == NULL)
333 return; 333 return;
334 memset(results, 0, new_count * sizeof(struct hfa384x_hostscan_result));
335 334
336 for (i = 0; i < new_count; i++) { 335 for (i = 0; i < new_count; i++) {
337 memcpy(&results[i], ptr, copy_len); 336 memcpy(&results[i], ptr, copy_len);