mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
[PATCH] hostap: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman <burman.yan@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
9cdac9657f
commit
b0471bb7b7
8 changed files with 12 additions and 32 deletions
|
@ -327,11 +327,10 @@ static void prism2_info_hostscanresults(local_info_t *local,
|
|||
ptr = (u8 *) pos;
|
||||
|
||||
new_count = left / result_size;
|
||||
results = kmalloc(new_count * sizeof(struct hfa384x_hostscan_result),
|
||||
results = kcalloc(new_count, sizeof(struct hfa384x_hostscan_result),
|
||||
GFP_ATOMIC);
|
||||
if (results == NULL)
|
||||
return;
|
||||
memset(results, 0, new_count * sizeof(struct hfa384x_hostscan_result));
|
||||
|
||||
for (i = 0; i < new_count; i++) {
|
||||
memcpy(&results[i], ptr, copy_len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue