From: Trond Myklebust Date: Fri, 5 Nov 2021 16:35:26 +0000 (-0400) Subject: NFS: Don't trace an uninitialised value X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4798f8058d6b6bcfaedf5560fc28a83f404cbb57;p=linux.git NFS: Don't trace an uninitialised value If fhandle is NULL or fattr is NULL, then 'error' is uninitialised. Reported-by: Nathan Chancellor Signed-off-by: Trond Myklebust Reviewed-by: Nathan Chancellor --- diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 210c5945ac2bc..36cb1012c7e14 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1814,7 +1814,7 @@ no_entry: } nfs_set_verifier(dentry, dir_verifier); out_label: - trace_nfs_lookup_exit(dir, dentry, flags, error); + trace_nfs_lookup_exit(dir, dentry, flags, PTR_ERR_OR_ZERO(res)); nfs4_label_free(label); out: nfs_free_fattr(fattr);