mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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>
This commit is contained in:
parent
08b0dec449
commit
3285a9aa65
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue