2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-29 21:14:45 +08:00

dlm: fix error return code in sctp_accept_from_sock()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
Wei Yongjun 2016-10-22 14:37:36 +00:00 committed by David Teigland
parent aa9f101285
commit 26c1ec2fe4

View File

@ -879,7 +879,8 @@ static int sctp_accept_from_sock(struct connection *con)
}
make_sockaddr(&prim.ssp_addr, 0, &addr_len);
if (addr_to_nodeid(&prim.ssp_addr, &nodeid)) {
ret = addr_to_nodeid(&prim.ssp_addr, &nodeid);
if (ret) {
unsigned char *b = (unsigned char *)&prim.ssp_addr;
log_print("reject connect from unknown addr");