aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2012-11-30 20:56:13 -0500
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2012-12-10 23:43:44 -0500
commit1042d60f917d78ef1a6eaea297a1020484d4bf74 (patch)
treed10132e127f0195635d5913bbbc8e107129e00b6
parent1fa95b0b6798164a31c1048efdf62b71038eb3d5 (diff)
f2fs: remove unneeded initialization
No need to initialize "struct f2fs_gc_kthread *gc_th = NULL", as gc_th = NULL, will be taken care by the return values of kmalloc(). And fix codes in other places. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
-rw-r--r--fs/f2fs/gc.c2
-rw-r--r--fs/f2fs/segment.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 3271be42c0b6..644aa3808273 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -89,7 +89,7 @@ static int gc_thread_func(void *data)
89 89
90int start_gc_thread(struct f2fs_sb_info *sbi) 90int start_gc_thread(struct f2fs_sb_info *sbi)
91{ 91{
92 struct f2fs_gc_kthread *gc_th = NULL; 92 struct f2fs_gc_kthread *gc_th;
93 93
94 gc_th = kmalloc(sizeof(struct f2fs_gc_kthread), GFP_KERNEL); 94 gc_th = kmalloc(sizeof(struct f2fs_gc_kthread), GFP_KERNEL);
95 if (!gc_th) 95 if (!gc_th)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index a177eb387d38..969df1a30d1c 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1489,7 +1489,7 @@ static int build_free_segmap(struct f2fs_sb_info *sbi)
1489 1489
1490static int build_curseg(struct f2fs_sb_info *sbi) 1490static int build_curseg(struct f2fs_sb_info *sbi)
1491{ 1491{
1492 struct curseg_info *array = NULL; 1492 struct curseg_info *array;
1493 int i; 1493 int i;
1494 1494
1495 array = kzalloc(sizeof(*array) * NR_CURSEG_TYPE, GFP_KERNEL); 1495 array = kzalloc(sizeof(*array) * NR_CURSEG_TYPE, GFP_KERNEL);
@@ -1656,7 +1656,7 @@ int build_segment_manager(struct f2fs_sb_info *sbi)
1656{ 1656{
1657 struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi); 1657 struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi);
1658 struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi); 1658 struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
1659 struct f2fs_sm_info *sm_info = NULL; 1659 struct f2fs_sm_info *sm_info;
1660 int err; 1660 int err;
1661 1661
1662 sm_info = kzalloc(sizeof(struct f2fs_sm_info), GFP_KERNEL); 1662 sm_info = kzalloc(sizeof(struct f2fs_sm_info), GFP_KERNEL);