Skip to content

Commit

Permalink
NFS: Remove unnecessary goto in nfs4_lookup_root_sec()
Browse files Browse the repository at this point in the history
Once again, it's easier and cleaner just to return the error directly.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
  • Loading branch information
Anna Schumaker authored and Anna Schumaker committed Jan 30, 2017
1 parent 334f87d commit 9df1336
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3416,16 +3416,11 @@ static int nfs4_lookup_root_sec(struct nfs_server *server, struct nfs_fh *fhandl
.pseudoflavor = flavor,
};
struct rpc_auth *auth;
int ret;

auth = rpcauth_create(&auth_args, server->client);
if (IS_ERR(auth)) {
ret = -EACCES;
goto out;
}
ret = nfs4_lookup_root(server, fhandle, info);
out:
return ret;
if (IS_ERR(auth))
return -EACCES;
return nfs4_lookup_root(server, fhandle, info);
}

/*
Expand Down

0 comments on commit 9df1336

Please sign in to comment.