fix warning in fs/dlm/netlink.c
authorIngo Molnar <mingo@elte.hu>
Wed, 26 Nov 2008 00:51:45 +0000 (16:51 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Nov 2008 00:51:45 +0000 (16:51 -0800)
this warning:

  fs/dlm/netlink.c: In function ‘dlm_timeout_warn’:
  fs/dlm/netlink.c:131: warning: ‘send_skb’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between prepare_data() and send_skb.

Annotate it.

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

index 18bda83cc8925b3ecbb5f3b3fc5cacfb65eacadc..aa2a5775a0274f88ebc8eda63d3e4fbe49eeaeb4 100644 (file)
@@ -127,8 +127,8 @@ static void fill_data(struct dlm_lock_data *data, struct dlm_lkb *lkb)
 
 void dlm_timeout_warn(struct dlm_lkb *lkb)
 {
+       struct sk_buff *uninitialized_var(send_skb);
        struct dlm_lock_data *data;
-       struct sk_buff *send_skb;
        size_t size;
        int rv;