summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-08-15 08:51:02 +0100
committerDavid Sterba <dsterba@suse.com>2017-08-18 16:36:29 +0200
commit938e1c77f8c9d345dab7c44ea5c0515fdad1ee8c (patch)
treea29ebc58ba2f59ea56aa7fa7e033175937b0131c /fs/btrfs/tree-log.c
parent2d77ab3cfbf26ced6d445bfbffe8f7b9c72c4008 (diff)
downloadlinux-938e1c77f8c9d345dab7c44ea5c0515fdad1ee8c.tar.gz
linux-938e1c77f8c9d345dab7c44ea5c0515fdad1ee8c.tar.bz2
linux-938e1c77f8c9d345dab7c44ea5c0515fdad1ee8c.zip
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: Colin Ian King <colin.king@canonical.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 3a11ae63676e..f05fcc67efa6 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -1143,8 +1143,6 @@ again:
goto again;
}
kfree(victim_name);
- if (ret)
- return ret;
next:
cur_offset += victim_name_len + sizeof(*extref);
}