diff mbox series

[v2,07/11] btrfs: quick_update_accounting drop variable err

Message ID 52fca12ea2bd6ec9e64495c5b498d2e498b219b0.1713370757.git.anand.jain@oracle.com (mailing list archive)
State New, archived
Headers show
Series part2 trivial adjustments for return variable coding style | expand

Commit Message

Anand Jain April 18, 2024, 7:08 a.m. UTC
In quick_update_accounting err is used as 2nd return value, which could
be achieved just with ret.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
v2: optimize __qgroup_excl_accounting() error out, so drop 'ret2' (Josef).

 fs/btrfs/qgroup.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index 9a9f84c4d3b8..9a0f47d0c6bf 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -1541,18 +1541,15 @@  static int quick_update_accounting(struct btrfs_fs_info *fs_info,
 {
 	struct btrfs_qgroup *qgroup;
 	int ret = 1;
-	int err = 0;
 
 	qgroup = find_qgroup_rb(fs_info, src);
 	if (!qgroup)
 		goto out;
 	if (qgroup->excl == qgroup->rfer) {
-		ret = 0;
-		err = __qgroup_excl_accounting(fs_info, dst, qgroup, sign);
-		if (err < 0) {
-			ret = err;
+		ret = __qgroup_excl_accounting(fs_info, dst, qgroup, sign);
+		if (ret < 0)
 			goto out;
-		}
+		ret = 0;
 	}
 out:
 	if (ret)