diff mbox series

[1/3] btrfs: remove pointless return value assignment at btrfs_finish_one_ordered()

Message ID 8618abb228019ca2fd331a993fb9461d76cce471.1712145320.git.fdmanana@suse.com (mailing list archive)
State New, archived
Headers show
Series btrfs: remove some unused and pointless code | expand

Commit Message

Filipe Manana April 3, 2024, 12:05 p.m. UTC
From: Filipe Manana <fdmanana@suse.com>

At btrfs_finish_one_ordered() it's pointless to assign 0 to the 'ret'
variable because if it has a non-zero value (error), we have already
jumped to the 'out' label. So remove that redundant assignment.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/inode.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index c6f2b5d1dee1..94ac20e62e13 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3185,7 +3185,6 @@  int btrfs_finish_one_ordered(struct btrfs_ordered_extent *ordered_extent)
 		btrfs_abort_transaction(trans, ret);
 		goto out;
 	}
-	ret = 0;
 out:
 	clear_extent_bit(&inode->io_tree, start, end, clear_bits,
 			 &cached_state);