Skip to content

Commit

Permalink
rds: send: Fix dead code in rds_sendmsg
Browse files Browse the repository at this point in the history
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: 1e2b44e ("rds: Enable RDS IPv6 support")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Acked-by: Sowmini Varadhan <[email protected]>
Acked-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
GustavoARSilva authored and davem330 committed Jul 26, 2018
1 parent ba7d7e2 commit dc66fe4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/rds/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit dc66fe4

Please sign in to comment.