tcp: remove unneeded variable 'err'
variable 'err' is unmodified after initalization, so simply cleans up it and returns 0. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
51f7e95187
Коммит
a01512b14d
|
@ -2531,7 +2531,6 @@ int tcp_disconnect(struct sock *sk, int flags)
|
||||||
struct inet_sock *inet = inet_sk(sk);
|
struct inet_sock *inet = inet_sk(sk);
|
||||||
struct inet_connection_sock *icsk = inet_csk(sk);
|
struct inet_connection_sock *icsk = inet_csk(sk);
|
||||||
struct tcp_sock *tp = tcp_sk(sk);
|
struct tcp_sock *tp = tcp_sk(sk);
|
||||||
int err = 0;
|
|
||||||
int old_state = sk->sk_state;
|
int old_state = sk->sk_state;
|
||||||
|
|
||||||
if (old_state != TCP_CLOSE)
|
if (old_state != TCP_CLOSE)
|
||||||
|
@ -2612,7 +2611,7 @@ int tcp_disconnect(struct sock *sk, int flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
sk->sk_error_report(sk);
|
sk->sk_error_report(sk);
|
||||||
return err;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(tcp_disconnect);
|
EXPORT_SYMBOL(tcp_disconnect);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче