Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 938e1c77 authored by Colin Ian King's avatar Colin Ian King Committed by David Sterba
Browse files

btrfs: remove redundant check on ret being non-zero



The error return variable ret is initialized to zero and then is
checked to see if it is non-zero in the if-block that follows it.
It is therefore impossible for ret to be non-zero after the if-block
hence the check is redundant and can be removed.

Detected by CoverityScan, CID#1021040 ("Logically dead code")

Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 2d77ab3c
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1143,8 +1143,6 @@ static inline int __add_inode_ref(struct btrfs_trans_handle *trans,
				goto again;
			}
			kfree(victim_name);
			if (ret)
				return ret;
next:
			cur_offset += victim_name_len + sizeof(*extref);
		}