2022-08-30 15:48:04

by CGEL

[permalink] [raw]
Subject: [PATCH linux-next] btrfs: remove redundant variables ret

From: Jinpeng Cui <[email protected]>

Rturn value directly from iterate_object_props() instead of
getting value from redundant variable ret.

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Jinpeng Cui <[email protected]>
---
fs/btrfs/props.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/btrfs/props.c b/fs/btrfs/props.c
index a2ec8ecae8de..055a631276ce 100644
--- a/fs/btrfs/props.c
+++ b/fs/btrfs/props.c
@@ -270,11 +270,8 @@ int btrfs_load_inode_props(struct inode *inode, struct btrfs_path *path)
{
struct btrfs_root *root = BTRFS_I(inode)->root;
u64 ino = btrfs_ino(BTRFS_I(inode));
- int ret;
-
- ret = iterate_object_props(root, path, ino, inode_prop_iterator, inode);

- return ret;
+ return iterate_object_props(root, path, ino, inode_prop_iterator, inode);
}

static int prop_compression_validate(const struct btrfs_inode *inode,
--
2.25.1