lkml.org 
[lkml]   [2021]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] net: rxrpc: Remove redundant assignment to ret
Date
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
\
 
 \ /
  Last update: 2021-04-29 12:51    [W:0.017 / U:1.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site