Commit 69eed23b authored by Colin Ian King's avatar Colin Ian King Committed by Chuck Lever
Browse files

NFSD: Remove redundant assignment to variable host_err



Variable host_err is assigned a value that is never read, it is being
re-assigned a value in every different execution path in the following
switch statement. The assignment is redundant and can be removed.

Cleans up clang-scan warning:
warning: Value stored to 'host_err' is never read [deadcode.DeadStores]

Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent eeadcb75
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -1305,7 +1305,6 @@ nfsd_create_locked(struct svc_rqst *rqstp, struct svc_fh *fhp,
		iap->ia_mode &= ~current_umask();
		iap->ia_mode &= ~current_umask();


	err = 0;
	err = 0;
	host_err = 0;
	switch (type) {
	switch (type) {
	case S_IFREG:
	case S_IFREG:
		host_err = vfs_create(&init_user_ns, dirp, dchild, iap->ia_mode, true);
		host_err = vfs_create(&init_user_ns, dirp, dchild, iap->ia_mode, true);