Skip to content

Commit

Permalink
niu: fix another warning in drivers/net/niu.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ingo Molnar authored and David S. Miller committed Nov 26, 2008
1 parent 51e0f05 commit f166400
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/niu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f166400

Please sign in to comment.