aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/f2fs/super.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index ddd2973ffcbf..fe86a7edfa60 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1977,8 +1977,10 @@ try_onemore:
sbi->write_io[i] = kmalloc(n * sizeof(struct f2fs_bio_info),
GFP_KERNEL);
- if (!sbi->write_io[i])
+ if (!sbi->write_io[i]) {
+ err = -ENOMEM;
goto free_options;
+ }
for (j = HOT; j < n; j++) {
init_rwsem(&sbi->write_io[i][j].io_rwsem);