提交 938e1c77 编写于 作者: C Colin Ian King 提交者: David Sterba

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: NColin Ian King <colin.king@canonical.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 2d77ab3c
...@@ -1143,8 +1143,6 @@ static inline int __add_inode_ref(struct btrfs_trans_handle *trans, ...@@ -1143,8 +1143,6 @@ static inline int __add_inode_ref(struct btrfs_trans_handle *trans,
goto again; goto again;
} }
kfree(victim_name); kfree(victim_name);
if (ret)
return ret;
next: next:
cur_offset += victim_name_len + sizeof(*extref); cur_offset += victim_name_len + sizeof(*extref);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册