Commit 72f76f73 authored by Darrick J. Wong's avatar Darrick J. Wong
Browse files

xfs: fix uninitialized return values in scrub code



Fix smatch complaints about uninitialized return codes.

Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
parent 0a1e1567
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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