Skip to content

Commit

Permalink
net/smc: Remove redundant assignment to rc
Browse files Browse the repository at this point in the history
Variable rc is set to zero 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.

Cleans up the following clang-analyzer warning:

net/smc/af_smc.c:1079:3: warning: Value stored to 'rc' is never read
[clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Jiapeng Chong authored and davem330 committed Apr 27, 2021
1 parent ad542fb commit 6fd6c48
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/smc/af_smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,6 @@ static int smc_connect(struct socket *sock, struct sockaddr *addr,
rc = -EISCONN;
goto out;
case SMC_INIT:
rc = 0;
break;
}

Expand Down

0 comments on commit 6fd6c48

Please sign in to comment.