diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2018-07-25 17:22:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-26 07:37:31 +0200 |
commit | dc66fe43b7ebdb53628dcbc1f8f15de3e000aacf (patch) | |
tree | 193a3416a31f937fbe801441c2e922a1f1f07cab /net/rds | |
parent | net/rds/Kconfig: RDS should depend on IPV6 (diff) | |
download | linux-dc66fe43b7ebdb53628dcbc1f8f15de3e000aacf.tar.xz linux-dc66fe43b7ebdb53628dcbc1f8f15de3e000aacf.zip |
rds: send: Fix dead code in rds_sendmsg
Currently, code at label *out* is unreachable. Fix this by updating
variable *ret* with -EINVAL, so the jump to *out* can be properly
executed instead of directly returning from function.
Addresses-Coverity-ID: 1472059 ("Structurally dead code")
Fixes: 1e2b44e78eea ("rds: Enable RDS IPv6 support")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds')
-rw-r--r-- | net/rds/send.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rds/send.c b/net/rds/send.c index 9604e1faa564..18e2b4d3931f 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -1126,7 +1126,7 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len) if (addr4 == htonl(INADDR_ANY) || addr4 == htonl(INADDR_BROADCAST) || IN_MULTICAST(ntohl(addr4))) { - return -EINVAL; + ret = -EINVAL; goto out; } } |