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

  drivers/net/niu.c: In function ‘esr_reset’:
  drivers/net/niu.c:741: warning: ‘reset’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between:

 - esr_read_reset() and 'reset'

Annotate it.

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

index 5b7b31d25be3d7de2b91b740e1f8dc250f40afb3..2f98f7a4117a66f444e689d6f5c4d72a59f561cb 100644 (file)
@@ -738,7 +738,7 @@ static int esr_write_glue0(struct niu *np, unsigned long chan, u32 val)
 
 static int esr_reset(struct niu *np)
 {
-       u32 reset;
+       u32 uninitialized_var(reset);
        int err;
 
        err = mdio_write(np, np->port, NIU_ESR_DEV_ADDR,