[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1619693456-111530-1-git-send-email-yang.lee@linux.alibaba.com>
Date: Thu, 29 Apr 2021 18:50:56 +0800
From: Yang Li <yang.lee@...ux.alibaba.com>
To: dhowells@...hat.com
Cc: davem@...emloft.net, kuba@...nel.org, nathan@...nel.org,
ndesaulniers@...gle.com, linux-afs@...ts.infradead.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
clang-built-linux@...glegroups.com,
Yang Li <yang.lee@...ux.alibaba.com>
Subject: [PATCH] net: rxrpc: Remove redundant assignment to ret
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@...ux.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
Powered by blists - more mailing lists