summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/parent.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2017-11-06 12:01:48 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2017-11-09 09:10:45 -0800
commit72f76f73642fa8528cab098b5f66abb299f1a018 (patch)
treedfc92172edf7700f2b7d889933d32aee326c1956 /fs/xfs/scrub/parent.c
parent0a1e1567b386b96c710d385181330c13ca03ffe3 (diff)
xfs: fix uninitialized return values in scrub code
Fix smatch complaints about uninitialized return codes. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/scrub/parent.c')
-rw-r--r--fs/xfs/scrub/parent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/scrub/parent.c b/fs/xfs/scrub/parent.c
index cc2b8f665416..63a25334fc83 100644
--- a/fs/xfs/scrub/parent.c
+++ b/fs/xfs/scrub/parent.c
@@ -143,7 +143,7 @@ xfs_scrub_parent_validate(
struct xfs_inode *dp = NULL;
xfs_nlink_t expected_nlink;
xfs_nlink_t nlink;
- int error;
+ int error = 0;
*try_again = false;
@@ -258,7 +258,7 @@ xfs_scrub_parent(
xfs_ino_t dnum;
bool try_again;
int tries = 0;
- int error;
+ int error = 0;
/*
* If we're a directory, check that the '..' link points up to