From: Dan Carpenter Date: Mon, 4 Dec 2023 12:30:06 +0000 (+0300) Subject: nfsd: remove unnecessary NULL check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3c86e615d17d1f6194ff222247d291fc9df16ff4;p=linux.git nfsd: remove unnecessary NULL check We check "state" for NULL on the previous line so it can't be NULL here. No need to check again. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202312031425.LffZTarR-lkp@intel.com/ Signed-off-by: Dan Carpenter Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever --- diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 3edbfa0233e68..2fa54cfd48823 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -6575,7 +6575,7 @@ unlock: spin_unlock(&nn->s2s_cp_lock); if (!state) return nfserr_bad_stateid; - if (!clp && state) + if (!clp) *cps = state; return 0; }