All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: rxrpc: Remove redundant assignment to ret
@ 2021-04-29 10:50 Yang Li
  0 siblings, 0 replies; only message in thread
From: Yang Li @ 2021-04-29 10:50 UTC (permalink / raw)
  To: dhowells
  Cc: davem, kuba, nathan, ndesaulniers, linux-afs, netdev,
	linux-kernel, clang-built-linux, Yang Li

Variable 'ret' is set to -EOPNOTSUPP but this value is never read as it is
overwritten with a new value later on, hence it is a redundant
assignment and can be removed.

Clean up the following clang-analyzer warning:

net/rxrpc/af_rxrpc.c:602:2: warning: Value stored to 'ret' is never read
[clang-analyzer-deadcode.DeadStores]

Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 net/rxrpc/af_rxrpc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
index 41671af..f2d81c5 100644
--- a/net/rxrpc/af_rxrpc.c
+++ b/net/rxrpc/af_rxrpc.c
@@ -599,7 +599,6 @@ static int rxrpc_setsockopt(struct socket *sock, int level, int optname,
 	_enter(",%d,%d,,%d", level, optname, optlen);
 
 	lock_sock(&rx->sk);
-	ret = -EOPNOTSUPP;
 
 	if (level == SOL_RXRPC) {
 		switch (optname) {
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-29 10:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 10:50 [PATCH] net: rxrpc: Remove redundant assignment to ret Yang Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.