mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][next] nfsd: remove redundant assignment to pointer dentry
@ 2023-02-14 14:14 Colin Ian King
  2023-02-14 14:55 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Ian King @ 2023-02-14 14:14 UTC (permalink / raw)
  To: Chuck Lever, Jeff Layton, linux-nfs; +Cc: kernel-janitors, linux-kernel

The pointer dentry is assigned a value that is never read, the
assignment is redundant and can be removed.

Cleans up clang-scan warning:
fs/nfsd/nfsctl.c:1231:2: warning: Value stored to 'dentry' is
never read [deadcode.DeadStores]
        dentry = ERR_PTR(ret);

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 fs/nfsd/nfsctl.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 04474b8ccf0a..5946064cd794 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -1228,7 +1228,6 @@ static void nfsd_symlink(struct dentry *parent, const char *name,
 	return;
 out_err:
 	dput(dentry);
-	dentry = ERR_PTR(ret);
 	goto out;
 }
 #else
-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-14 15:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14 14:14 [PATCH][next] nfsd: remove redundant assignment to pointer dentry Colin Ian King
2023-02-14 14:55 ` Dan Carpenter
2023-02-14 15:16   ` Chuck Lever III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®