aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-08-03 04:28:48 -0400
committerDavid S. Miller <davem@davemloft.net>2018-08-03 19:52:07 -0400
commita01512b14d4faa9f6f7501201d7033216d2e563a (patch)
treeba09bdabc265915b754a1e3b072e7ef8b788f7f7 /net/ipv4/tcp.c
parent51f7e95187f127d5eadf50541943813ff57f12ba (diff)
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>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 31fa1c080f28..b8af2fec5ad5 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2531,7 +2531,6 @@ int tcp_disconnect(struct sock *sk, int flags)
2531 struct inet_sock *inet = inet_sk(sk); 2531 struct inet_sock *inet = inet_sk(sk);
2532 struct inet_connection_sock *icsk = inet_csk(sk); 2532 struct inet_connection_sock *icsk = inet_csk(sk);
2533 struct tcp_sock *tp = tcp_sk(sk); 2533 struct tcp_sock *tp = tcp_sk(sk);
2534 int err = 0;
2535 int old_state = sk->sk_state; 2534 int old_state = sk->sk_state;
2536 2535
2537 if (old_state != TCP_CLOSE) 2536 if (old_state != TCP_CLOSE)
@@ -2612,7 +2611,7 @@ int tcp_disconnect(struct sock *sk, int flags)
2612 } 2611 }
2613 2612
2614 sk->sk_error_report(sk); 2613 sk->sk_error_report(sk);
2615 return err; 2614 return 0;
2616} 2615}
2617EXPORT_SYMBOL(tcp_disconnect); 2616EXPORT_SYMBOL(tcp_disconnect);
2618 2617