[PATCH linux-next] ext4: remove redundant variable err

From: cgel . zte
Date: Wed Aug 31 2022 - 12:08:57 EST


From: Jinpeng Cui <cui.jinpeng2@xxxxxxxxxx>

Return value directly from ext4_group_extend_no_check()
instead of getting value from redundant variable err.

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@xxxxxxxxxx>
---
fs/ext4/resize.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index fea2a68d067b..94460f3ca666 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1826,7 +1826,6 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
ext4_grpblk_t last;
ext4_grpblk_t add;
struct buffer_head *bh;
- int err;
ext4_group_t group;

o_blocks_count = ext4_blocks_count(es);
@@ -1881,8 +1880,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
}
brelse(bh);

- err = ext4_group_extend_no_check(sb, o_blocks_count, add);
- return err;
+ return ext4_group_extend_no_check(sb, o_blocks_count, add);
} /* ext4_group_extend */


--
2.25.1