summaryrefslogtreecommitdiff
path: root/fs/xfs
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-01-23 07:54:09 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2020-01-23 16:11:32 -0800
commit54027a49938bbee1af62fad191139b14d4ee5cd2 (patch)
tree7d50ffbb74f8f72f670326ea9a6752f257b4cd2c /fs/xfs
parentaa124436f329cc23e88ce67c81b5f6b7f4930529 (diff)
xfs: fix uninitialized variable in xfs_attr3_leaf_inactive
Dan Carpenter pointed out that error is uninitialized. While there never should be an attr leaf block with zero entries, let's not leave that logic bomb there. Fixes: 0bb9d159bd01 ("xfs: streamline xfs_attr3_leaf_inactive") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Allison Collins <allison.henderson@oracle.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_attr_inactive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_attr_inactive.c b/fs/xfs/xfs_attr_inactive.c
index c75840a9e478..8fbb841cd6fe 100644
--- a/fs/xfs/xfs_attr_inactive.c
+++ b/fs/xfs/xfs_attr_inactive.c
@@ -89,7 +89,7 @@ xfs_attr3_leaf_inactive(
struct xfs_attr_leafblock *leaf = bp->b_addr;
struct xfs_attr_leaf_entry *entry;
struct xfs_attr_leaf_name_remote *name_rmt;
- int error;
+ int error = 0;
int i;
xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichdr, leaf);