From: Fabian Frederick Date: Mon, 23 Jun 2014 16:39:15 +0000 (+0200) Subject: f2fs: replace count*size kzalloc by kcalloc X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b434babf854eab82397759e98425423cd9bc4786;p=linux-beck.git f2fs: replace count*size kzalloc by kcalloc kcalloc manages count*sizeof overflow. Cc: Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net Signed-off-by: Fabian Frederick Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index d04613df710a..a4f8375f6ae6 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1703,7 +1703,7 @@ static int build_curseg(struct f2fs_sb_info *sbi) struct curseg_info *array; int i; - array = kzalloc(sizeof(*array) * NR_CURSEG_TYPE, GFP_KERNEL); + array = kcalloc(NR_CURSEG_TYPE, sizeof(*array), GFP_KERNEL); if (!array) return -ENOMEM;