diff options
author | Zhang Qilong <zhangqilong3@huawei.com> | 2022-08-23 19:20:22 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-09-12 23:08:25 -0700 |
commit | 8140654e781de334601b260b493ff13e14379ff8 (patch) | |
tree | db70b8f2f4900414b872c534e103928e4486f124 /fs/f2fs | |
parent | ddd3b16c8cc54ce776bf117bde0c4d588706ea49 (diff) |
f2fs: simplify code in f2fs_prepare_decomp_mem
It could return directly after init_decompress_ctx.
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/compress.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 70e97075e535..730256732a9e 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -1568,12 +1568,8 @@ static int f2fs_prepare_decomp_mem(struct decompress_io_ctx *dic, if (!dic->cbuf) return -ENOMEM; - if (cops->init_decompress_ctx) { - int ret = cops->init_decompress_ctx(dic); - - if (ret) - return ret; - } + if (cops->init_decompress_ctx) + return cops->init_decompress_ctx(dic); return 0; } |