Commit d0a7fcc7 authored by Chaehyun Lim's avatar Chaehyun Lim Committed by Greg Kroah-Hartman
Browse files

staging: wilc1000: replace kmalloc_array/memset with kcalloc



This patch replaces kmalloc_array followed by memset with kcalloc.

Signed-off-by: default avatarChaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 02cf299d
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -644,13 +644,11 @@ s32 ParseSurveyResults(u8 ppu8RcvdSiteSurveyResults[][MAX_SURVEY_RESULT_FRAG_SIZ
		}
	}

	pstrSurveyResults = kmalloc_array(u32SurveyResultsCount,
	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++) {