From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> Fix smatch complaints about uninitialized return codes. Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --- fs/xfs/scrub/dir.c | 2 +- fs/xfs/scrub/parent.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/xfs/scrub/dir.c b/fs/xfs/scrub/dir.c index c8ca3fd..69e1efd 100644 --- a/fs/xfs/scrub/dir.c +++ b/fs/xfs/scrub/dir.c @@ -748,7 +748,7 @@ xfs_scrub_directory( }; size_t bufsize; loff_t oldpos; - int error; + int error = 0; if (!S_ISDIR(VFS_I(sc->ip)->i_mode)) return -ENOENT; diff --git a/fs/xfs/scrub/parent.c b/fs/xfs/scrub/parent.c index cc2b8f6..63a2533 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 -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html