summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/coreconfigurator.c
diff options
context:
space:
mode:
authorChaehyun Lim2015-09-22 15:47:41 +0200
committerGreg Kroah-Hartman2015-09-29 02:32:36 +0200
commitd0a7fcc7e6978051fc38ae885ab5fd8bc9d6b281 (patch)
tree80ae68859a5c00944601039de50efeefd4140b18 /drivers/staging/wilc1000/coreconfigurator.c
parentstaging: wilc1000: replace kmalloc/memcpy with kmemdup (diff)
downloadkernel-qcow2-linux-d0a7fcc7e6978051fc38ae885ab5fd8bc9d6b281.tar.gz
kernel-qcow2-linux-d0a7fcc7e6978051fc38ae885ab5fd8bc9d6b281.tar.xz
kernel-qcow2-linux-d0a7fcc7e6978051fc38ae885ab5fd8bc9d6b281.zip
staging: wilc1000: replace kmalloc_array/memset with kcalloc
This patch replaces kmalloc_array followed by memset with kcalloc. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/coreconfigurator.c')
-rw-r--r--drivers/staging/wilc1000/coreconfigurator.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 875b769d95a9..8b56b92b5503 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -644,13 +644,11 @@ s32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZ
}
}
- pstrSurveyResults = kmalloc_array(u32SurveyResultsCount,
- sizeof(wid_site_survey_reslts_s), GFP_KERNEL);
+ pstrSurveyResults = kcalloc(u32SurveyResultsCount,
+ sizeof(wid_site_survey_reslts_s), GFP_KERNEL);
if (!pstrSurveyResults)
return -ENOMEM;
- memset((void *)(pstrSurveyResults), 0, u32SurveyResultsCount * sizeof(wid_site_survey_reslts_s));
-
u32SurveyResultsCount = 0;
for (i = 0; i < u32RcvdSurveyResultsNum; i++) {