diff options
author | Hariprasad Kelam <hariprasad.kelam@gmail.com> | 2019-05-12 06:39:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-12 16:21:30 -0400 |
commit | 3285a9aa6570df84d0c1ea8f1691fbee45c8d821 (patch) | |
tree | b930b7ed7716fad941a4129be3826a7ef9cdbfad | |
parent | 08b0dec4494ead3d10cfe2a4bedaa0de97857620 (diff) |
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>
-rw-r--r-- | net/dccp/proto.c | 3 |
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) | |||
263 | struct inet_connection_sock *icsk = inet_csk(sk); | 263 | struct inet_connection_sock *icsk = inet_csk(sk); |
264 | struct inet_sock *inet = inet_sk(sk); | 264 | struct inet_sock *inet = inet_sk(sk); |
265 | struct dccp_sock *dp = dccp_sk(sk); | 265 | struct dccp_sock *dp = dccp_sk(sk); |
266 | int err = 0; | ||
267 | const int old_state = sk->sk_state; | 266 | const int old_state = sk->sk_state; |
268 | 267 | ||
269 | if (old_state != DCCP_CLOSED) | 268 | if (old_state != DCCP_CLOSED) |
@@ -307,7 +306,7 @@ int dccp_disconnect(struct sock *sk, int flags) | |||
307 | WARN_ON(inet->inet_num && !icsk->icsk_bind_hash); | 306 | WARN_ON(inet->inet_num && !icsk->icsk_bind_hash); |
308 | 307 | ||
309 | sk->sk_error_report(sk); | 308 | sk->sk_error_report(sk); |
310 | return err; | 309 | return 0; |
311 | } | 310 | } |
312 | 311 | ||
313 | EXPORT_SYMBOL_GPL(dccp_disconnect); | 312 | EXPORT_SYMBOL_GPL(dccp_disconnect); |