mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 01:36:52 +09:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
02cf299d0e
commit
d0a7fcc7e6
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user