summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-08-03 16:28:48 +0800
committerDavid S. Miller <davem@davemloft.net>2018-08-03 16:52:07 -0700
commita01512b14d4faa9f6f7501201d7033216d2e563a (patch)
treeba09bdabc265915b754a1e3b072e7ef8b788f7f7
parent51f7e95187f127d5eadf50541943813ff57f12ba (diff)
downloadlinux-rpi3-a01512b14d4faa9f6f7501201d7033216d2e563a.tar.gz
linux-rpi3-a01512b14d4faa9f6f7501201d7033216d2e563a.tar.bz2
linux-rpi3-a01512b14d4faa9f6f7501201d7033216d2e563a.zip
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>
-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)
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
- int err = 0;
int old_state = sk->sk_state;
if (old_state != TCP_CLOSE)
@@ -2612,7 +2611,7 @@ int tcp_disconnect(struct sock *sk, int flags)
}
sk->sk_error_report(sk);
- return err;
+ return 0;
}
EXPORT_SYMBOL(tcp_disconnect);