Skip to content

Commit 68c43a2

Browse files
Yunlei HeJaegeuk Kim
authored andcommitted
f2fs: check the right return value of memory alloc function
This patch check the right return value of memory alloc function Signed-off-by: Yunlei He <heyunlei@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent b138547 commit 68c43a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/f2fs/node.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2798,7 +2798,7 @@ static int init_free_nid_cache(struct f2fs_sb_info *sbi)
27982798
for (i = 0; i < nm_i->nat_blocks; i++) {
27992799
nm_i->free_nid_bitmap[i] = f2fs_kvzalloc(sbi,
28002800
f2fs_bitmap_size(NAT_ENTRY_PER_BLOCK), GFP_KERNEL);
2801-
if (!nm_i->free_nid_bitmap)
2801+
if (!nm_i->free_nid_bitmap[i])
28022802
return -ENOMEM;
28032803
}
28042804

0 commit comments

Comments
 (0)