mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
sctp: fix error return code in __sctp_connect()
Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Vlad Yasevich <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
cfbe800b8b
commit
524fba6c14
1 changed files with 3 additions and 2 deletions
|
|
@ -1119,9 +1119,10 @@ static int __sctp_connect(struct sock* sk,
|
|||
/* Make sure the destination port is correctly set
|
||||
* in all addresses.
|
||||
*/
|
||||
if (asoc && asoc->peer.port && asoc->peer.port != port)
|
||||
if (asoc && asoc->peer.port && asoc->peer.port != port) {
|
||||
err = -EINVAL;
|
||||
goto out_free;
|
||||
|
||||
}
|
||||
|
||||
/* Check if there already is a matching association on the
|
||||
* endpoint (other than the one created here).
|
||||
|
|
|
|||
Loading…
Reference in a new issue