[PATCH next] btrfs: tracepoints: fix error code in add_conflicting_inode()

Dan Carpenter <[email protected]>
Newsgroups org.kernel.vger.kernel-janitors,org.kernel.vger.linux-btrfs
Message-ID <[email protected]>
This code had a second "ret" variable that shadowed the "real ret
variable" so when we set the error code it was just discarded and
we returned success.  Get rid of the shadow variable.

Fixes: 3e4489a270f2 ("btrfs: tracepoints: add trace event for add_conflicting_inode()")
Signed-off-by: Dan Carpenter <[email protected]>
---
 fs/btrfs/tree-log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index bcccddcc568c..f01a53e825b0 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -6174,7 +6174,7 @@ static int add_conflicting_inode(struct btrfs_trans_handle *trans,
 	 *    some inode from it to some other directory).
 	 */
 	if (IS_ERR(inode)) {
-		int ret = PTR_ERR(inode);
+		ret = PTR_ERR(inode);
 
 		if (ret != -ENOENT)
 			goto out;
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.