ila: propagate error code in ila_output
authorstephen hemminger <stephen@networkplumber.org>
Fri, 19 May 2017 16:55:49 +0000 (09:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 May 2017 17:42:33 +0000 (13:42 -0400)
This warning:
net/ipv6/ila/ila_lwt.c: In function ‘ila_output’:
net/ipv6/ila/ila_lwt.c:42:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]

It looks like the code attempts to set propagate different error
values, but always returned -EINVAL.

Compile tested only. Needs review by original author.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ila/ila_lwt.c

index b3df03e3faa07d96f170e5ff0b535ebb16216c05..f4a413aba423488a20085e9f5b4910e68a692796 100644 (file)
@@ -91,7 +91,7 @@ static int ila_output(struct net *net, struct sock *sk, struct sk_buff *skb)
 
 drop:
        kfree_skb(skb);
-       return -EINVAL;
+       return err;
 }
 
 static int ila_input(struct sk_buff *skb)