diff options
author | Zhang Qilong <zhangqilong3@huawei.com> | 2022-08-23 13:20:22 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-09-13 08:08:25 +0200 |
commit | 8140654e781de334601b260b493ff13e14379ff8 (patch) | |
tree | db70b8f2f4900414b872c534e103928e4486f124 /fs/f2fs/compress.c | |
parent | f2fs: replace logical value "true" with a int number (diff) | |
download | linux-8140654e781de334601b260b493ff13e14379ff8.tar.xz linux-8140654e781de334601b260b493ff13e14379ff8.zip |
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/compress.c')
-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; } |