From 4798f8058d6b6bcfaedf5560fc28a83f404cbb57 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Fri, 5 Nov 2021 12:35:26 -0400 Subject: [PATCH] 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 --- fs/nfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 210c594..36cb101 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); -- 2.7.4