]> Git Repo - linux.git/commitdiff
dlm: fix error return code in sctp_accept_from_sock()
authorWei Yongjun <[email protected]>
Sat, 22 Oct 2016 14:37:36 +0000 (14:37 +0000)
committerDavid Teigland <[email protected]>
Mon, 24 Oct 2016 15:01:51 +0000 (10:01 -0500)
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 <[email protected]>
Signed-off-by: David Teigland <[email protected]>
fs/dlm/lowcomms.c

index df680a26141b258bb66374beae23a201022cb509..7d398d300e972c3604727ac8d6d4fbf7302318a6 100644 (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");
This page took 0.067929 seconds and 4 git commands to generate.