]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ipv6: fix warning in net/ipv6/ip6_flowlabel.c
authorIngo Molnar <mingo@elte.hu>
Wed, 26 Nov 2008 00:50:30 +0000 (16:50 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Nov 2008 00:50:30 +0000 (16:50 -0800)
this warning:

  net/ipv6/ip6_flowlabel.c: In function ‘ipv6_flowlabel_opt’:
  net/ipv6/ip6_flowlabel.c:467: warning: ‘err’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between fl_create() and 'err'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_flowlabel.c

index 7927a8498d17d3a91ad89e49a78a1bd838a6272c..5656e8aa47d856aad549d49d34548bcb845b2251 100644 (file)
@@ -464,7 +464,7 @@ static inline void fl_link(struct ipv6_pinfo *np, struct ipv6_fl_socklist *sfl,
 
 int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen)
 {
-       int err;
+       int uninitialized_var(err);
        struct net *net = sock_net(sk);
        struct ipv6_pinfo *np = inet6_sk(sk);
        struct in6_flowlabel_req freq;