From: Colin Ian King Date: Tue, 15 Aug 2017 07:51:02 +0000 (+0100) Subject: btrfs: remove redundant check on ret being non-zero X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=938e1c77f8c9d345dab7c44ea5c0515fdad1ee8c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: David Sterba Signed-off-by: David Sterba --- 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); }