From fe9efcb37d1f07530c6fe59a9c2ab7a1182a3fac Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 16 Jan 2025 13:22:04 -0800 Subject: [PATCH] libxfs: fix uninit variable in libxfs_alloc_file_space 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" Reviewed-by: Christoph Hellwig --- libxfs/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libxfs/util.c b/libxfs/util.c index 4a9dd254..3597850d 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; -- 2.47.2