mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
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: 1e2b44e78e
("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>
This commit is contained in:
parent
ba7d7e2677
commit
dc66fe43b7
1 changed files with 1 additions and 1 deletions
|
@ -1126,7 +1126,7 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len)
|
||||||
if (addr4 == htonl(INADDR_ANY) ||
|
if (addr4 == htonl(INADDR_ANY) ||
|
||||||
addr4 == htonl(INADDR_BROADCAST) ||
|
addr4 == htonl(INADDR_BROADCAST) ||
|
||||||
IN_MULTICAST(ntohl(addr4))) {
|
IN_MULTICAST(ntohl(addr4))) {
|
||||||
return -EINVAL;
|
ret = -EINVAL;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue