ext4: Remove unnecessary variable assignments

Message ID 1681731135-18768-1-git-send-email-wubo@huaweicloud.com
State New
Headers
Series ext4: Remove unnecessary variable assignments |

Commit Message

Wu Bo April 17, 2023, 11:32 a.m. UTC
  Just remove unnecessary variable assignments.

Signed-off-by: Wu Bo <wubo@huaweicloud.com>
---
 fs/ext4/mballoc.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Jan Kara April 28, 2023, 2:58 p.m. UTC | #1
On Mon 17-04-23 19:32:15, Wu Bo wrote:
> Just remove unnecessary variable assignments.
> 
> Signed-off-by: Wu Bo <wubo@huaweicloud.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/ext4/mballoc.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 5b2ae37..f0b790d 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -5842,7 +5842,6 @@ static void ext4_free_blocks_simple(struct inode *inode, ext4_fsblk_t block,
>  	ext4_get_group_no_and_offset(sb, block, &group, &blkoff);
>  	bitmap_bh = ext4_read_block_bitmap(sb, group);
>  	if (IS_ERR(bitmap_bh)) {
> -		err = PTR_ERR(bitmap_bh);
>  		pr_warn("Failed to read block bitmap\n");
>  		return;
>  	}
> -- 
> 1.8.3.1
>
  

Patch

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 5b2ae37..f0b790d 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -5842,7 +5842,6 @@  static void ext4_free_blocks_simple(struct inode *inode, ext4_fsblk_t block,
 	ext4_get_group_no_and_offset(sb, block, &group, &blkoff);
 	bitmap_bh = ext4_read_block_bitmap(sb, group);
 	if (IS_ERR(bitmap_bh)) {
-		err = PTR_ERR(bitmap_bh);
 		pr_warn("Failed to read block bitmap\n");
 		return;
 	}