mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
irda: stop calling sk_prot->disconnect() on connection failure
The sk_prot is irda's own set of protocol handlers, so irda should statically know what that function is anyway, without using an indirect pointer. And as it happens, we know *exactly* what that pointer is statically: it's NULL, because irda doesn't define a disconnect operation. So calling that function is doubly wrong, and will just cause an oops. Reported-by: Martin Lang <[email protected]> Cc: Samuel Ortiz <[email protected]> Cc: David Miller <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
12d7aacab5
commit
4cb8c3593b
1 changed files with 0 additions and 2 deletions
|
|
@ -1064,8 +1064,6 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr,
|
|||
|
||||
if (sk->sk_state != TCP_ESTABLISHED) {
|
||||
sock->state = SS_UNCONNECTED;
|
||||
if (sk->sk_prot->disconnect(sk, flags))
|
||||
sock->state = SS_DISCONNECTING;
|
||||
err = sock_error(sk);
|
||||
if (!err)
|
||||
err = -ECONNRESET;
|
||||
|
|
|
|||
Loading…
Reference in a new issue