cassini: fix warning in drivers/net/cassini.c
authorIngo Molnar <mingo@elte.hu>
Wed, 26 Nov 2008 00:57:05 +0000 (16:57 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Nov 2008 00:57:05 +0000 (16:57 -0800)
this warning:

  drivers/net/cassini.c: In function ‘cas_rx_ringN’:
  drivers/net/cassini.c:2350: warning: ‘skb’ may be used uninitialized in this function

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

Annotate it.

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

index bc84c4ca898eb9ed9040a0ff0a9cc93357069fad..023d205e90543c0ebcb37137023a2d9c9cc7435c 100644 (file)
@@ -2347,7 +2347,7 @@ static int cas_rx_ringN(struct cas *cp, int ring, int budget)
        drops = 0;
        while (1) {
                struct cas_rx_comp *rxc = rxcs + entry;
-               struct sk_buff *skb;
+               struct sk_buff *uninitialized_var(skb);
                int type, len;
                u64 words[4];
                int i, dring;