* [PATCH] net: dccp : proto: remove Unneeded variable "err"
@ 2019-05-12 10:39 Hariprasad Kelam
2019-05-12 20:21 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Kelam @ 2019-05-12 10:39 UTC (permalink / raw)
To: Gerrit Renker, David S. Miller, dccp, netdev, linux-kernel
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>
---
net/dccp/proto.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 0e2f71a..5dd85ec 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);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: dccp : proto: remove Unneeded variable "err"
2019-05-12 10:39 [PATCH] net: dccp : proto: remove Unneeded variable "err" Hariprasad Kelam
@ 2019-05-12 20:21 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-05-12 20:21 UTC (permalink / raw)
To: hariprasad.kelam; +Cc: gerrit, dccp, netdev, linux-kernel
From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Date: Sun, 12 May 2019 16:09:49 +0530
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-12 20:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-12 10:39 [PATCH] net: dccp : proto: remove Unneeded variable "err" Hariprasad Kelam
2019-05-12 20:21 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).