From: Fabian Frederick Date: Mon, 23 Jun 2014 16:39:15 +0000 (+0200) Subject: f2fs: replace count*size kzalloc by kcalloc X-Git-Tag: v4.14-rc1~7106^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b434babf854eab82397759e98425423cd9bc4786;p=platform%2Fkernel%2Flinux-rpi.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 d04613d..a4f8375 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;