* [PATCH] libxfs: fix uninit variable in libxfs_alloc_file_space
@ 2025-01-09 0:57 Darrick J. Wong
2025-01-09 6:08 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2025-01-09 0:57 UTC (permalink / raw)
To: Andrey Albershteyn; +Cc: xfs
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>
---
libxfs/util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-09 6:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-09 0:57 [PATCH] libxfs: fix uninit variable in libxfs_alloc_file_space Darrick J. Wong
2025-01-09 6:08 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox