diff mbox series

xfs_repair: don't obliterate return codes

Message ID 20250109005650.GK1306365@frogsfrogsfrogs (mailing list archive)
State New
Headers show
Series xfs_repair: don't obliterate return codes | expand

Commit Message

Darrick J. Wong Jan. 9, 2025, 12:56 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Don't clobber error here, it's err2 that's the temporary variable.

Coverity-id: 1637363
Fixes: b790ab2a303d58 ("xfs_repair: support quota inodes in the metadata directory")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
 repair/quotacheck.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoph Hellwig Jan. 9, 2025, 6:08 a.m. UTC | #1
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/repair/quotacheck.c b/repair/quotacheck.c
index 8c7339b267d8e6..7953144c3f416b 100644
--- a/repair/quotacheck.c
+++ b/repair/quotacheck.c
@@ -691,7 +691,7 @@  discover_quota_inodes(
 	err2 = mark_quota_inode(tp, dp, XFS_DQTYPE_GROUP);
 	if (err2 && !error)
 		error = err2;
-	error = mark_quota_inode(tp, dp, XFS_DQTYPE_PROJ);
+	err2 = mark_quota_inode(tp, dp, XFS_DQTYPE_PROJ);
 	if (err2 && !error)
 		error = err2;