diff mbox series

[3/8] libxfs: fix uninit variable in libxfs_alloc_file_space

Message ID 173706332252.1823674.14773579267642290396.stgit@frogsfrogsfrogs (mailing list archive)
State New
Headers show
Series [1/8] xfs_db: fix multiple dblock commands | expand

Commit Message

Darrick J. Wong Jan. 16, 2025, 9:39 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Fix this uninitialized variable.

Coverity-id: 1637359
Fixes: b48164b8cd7618 ("libxfs: resync libxfs_alloc_file_space interface with the kernel")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
 libxfs/util.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libxfs/util.c b/libxfs/util.c
index 4a9dd254083a63..3597850ddccb9a 100644
--- a/libxfs/util.c
+++ b/libxfs/util.c
@@ -193,7 +193,7 @@  libxfs_alloc_file_space(
 	int			rt;
 	xfs_trans_t		*tp;
 	xfs_bmbt_irec_t		imaps[1], *imapp;
-	int			error;
+	int			error = 0;
 
 	if (len <= 0)
 		return -EINVAL;