* [PATCH] net: ipv6: rpl_iptunnel: remove redundant assignments to variable err
@ 2020-04-02 10:18 Colin King
2020-04-02 13:58 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2020-04-02 10:18 UTC (permalink / raw)
To: David S . Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI,
Jakub Kicinski, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable err is being initialized with a value that is never
read and it is being updated later with a new value. The initialization
is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/ipv6/rpl_iptunnel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/rpl_iptunnel.c b/net/ipv6/rpl_iptunnel.c
index a49ddc6cd020..c3ececd7cfc1 100644
--- a/net/ipv6/rpl_iptunnel.c
+++ b/net/ipv6/rpl_iptunnel.c
@@ -210,7 +210,7 @@ static int rpl_output(struct net *net, struct sock *sk, struct sk_buff *skb)
struct dst_entry *orig_dst = skb_dst(skb);
struct dst_entry *dst = NULL;
struct rpl_lwt *rlwt;
- int err = -EINVAL;
+ int err;
rlwt = rpl_lwt_lwtunnel(orig_dst->lwtstate);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: ipv6: rpl_iptunnel: remove redundant assignments to variable err
2020-04-02 10:18 [PATCH] net: ipv6: rpl_iptunnel: remove redundant assignments to variable err Colin King
@ 2020-04-02 13:58 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-04-02 13:58 UTC (permalink / raw)
To: colin.king; +Cc: kuznet, yoshfuji, kuba, netdev, kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Thu, 2 Apr 2020 11:18:59 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable err is being initialized with a value that is never
> read and it is being updated later with a new value. The initialization
> is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-02 13:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02 10:18 [PATCH] net: ipv6: rpl_iptunnel: remove redundant assignments to variable err Colin King
2020-04-02 13:58 ` 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).