summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intersil/hostap/hostap_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/intersil/hostap/hostap_info.c')
-rw-r--r--drivers/net/wireless/intersil/hostap/hostap_info.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/intersil/hostap/hostap_info.c b/drivers/net/wireless/intersil/hostap/hostap_info.c
index de8a099a9386..da8c30f10d92 100644
--- a/drivers/net/wireless/intersil/hostap/hostap_info.c
+++ b/drivers/net/wireless/intersil/hostap/hostap_info.c
@@ -271,8 +271,9 @@ static void prism2_info_scanresults(local_info_t *local, unsigned char *buf,
left -= 4;
new_count = left / sizeof(struct hfa384x_scan_result);
- results = kmalloc(new_count * sizeof(struct hfa384x_hostscan_result),
- GFP_ATOMIC);
+ results = kmalloc_array(new_count,
+ sizeof(struct hfa384x_hostscan_result),
+ GFP_ATOMIC);
if (results == NULL)
return;