summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHariprasad Kelam <hariprasad.kelam@gmail.com>2019-05-12 12:39:49 +0200
committerDavid S. Miller <davem@davemloft.net>2019-05-12 22:21:30 +0200
commit3285a9aa6570df84d0c1ea8f1691fbee45c8d821 (patch)
treeb930b7ed7716fad941a4129be3826a7ef9cdbfad
parentMerge branch 'dsa-Fix-a-bug-and-avoid-dangerous-usage-patterns' (diff)
downloadlinux-3285a9aa6570df84d0c1ea8f1691fbee45c8d821.tar.xz
linux-3285a9aa6570df84d0c1ea8f1691fbee45c8d821.zip
net: dccp : proto: remove Unneeded variable "err"
Fix below issue reported by coccicheck net/dccp/proto.c:266:5-8: Unneeded variable: "err". Return "0" on line 310 Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/dccp/proto.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 0e2f71ab8367..5dd85ec51bfe 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -263,7 +263,6 @@ int dccp_disconnect(struct sock *sk, int flags)
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
struct dccp_sock *dp = dccp_sk(sk);
- int err = 0;
const int old_state = sk->sk_state;
if (old_state != DCCP_CLOSED)
@@ -307,7 +306,7 @@ int dccp_disconnect(struct sock *sk, int flags)
WARN_ON(inet->inet_num && !icsk->icsk_bind_hash);
sk->sk_error_report(sk);
- return err;
+ return 0;
}
EXPORT_SYMBOL_GPL(dccp_disconnect);