aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllison Henderson <[email protected]>2021-06-25 11:19:58 -0700
committerDarrick J. Wong <[email protected]>2021-06-25 11:19:58 -0700
commitd3a3340b6af28ab79a66687973fb0287d976d490 (patch)
treec365e134a16d3b2ad4c4e8eae230cb797797e530
parenta8f3522c9a1f4a31e93b17f2b5310a2b615f5581 (diff)
xfs: Initialize error in xfs_attr_remove_iter
A recent bug report generated a warning that a code path in xfs_attr_remove_iter could potentially return error uninitialized in the case of XFS_DAS_RM_SHRINK state. Fix this by initializing error. Signed-off-by: Allison Henderson <[email protected]> Reported-by: Dan Carpenter <[email protected]> Reviewed-by: Brian Foster <[email protected]> Reviewed-by: Bill O'Donnell <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
-rw-r--r--fs/xfs/libxfs/xfs_attr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
index 611dc67234a6..d9d7d5137b73 100644
--- a/fs/xfs/libxfs/xfs_attr.c
+++ b/fs/xfs/libxfs/xfs_attr.c
@@ -1375,7 +1375,7 @@ xfs_attr_remove_iter(
{
struct xfs_da_args *args = dac->da_args;
struct xfs_da_state *state = dac->da_state;
- int retval, error;
+ int retval, error = 0;
struct xfs_inode *dp = args->dp;
trace_xfs_attr_node_removename(args);