Skip to content

Commit

Permalink
drivers/net/niu.c: fix sparse warning: symbol shadows an earlier one
Browse files Browse the repository at this point in the history
Impact: Move variable declaration to a more inner scope.

Fix this sparse warning:
  drivers/net/niu.c:2399:21: warning: symbol 'err' shadows an earlier one
  drivers/net/niu.c:2287:13: originally declared here

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hannes Eder authored and David S. Miller committed Feb 18, 2009
1 parent 5d7dce7 commit 7c34eb8
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 @@ -2284,7 +2284,6 @@ static int serdes_init_10g_serdes(struct niu *np)
struct niu_link_config *lp = &np->link_config;
unsigned long ctrl_reg, test_cfg_reg, pll_cfg, i;
u64 ctrl_val, test_cfg_val, sig, mask, val;
int err;
u64 reset_val;

switch (np->port) {
Expand Down Expand Up @@ -2337,6 +2336,7 @@ static int serdes_init_10g_serdes(struct niu *np)
/* Initialize all 4 lanes of the SERDES. */
for (i = 0; i < 4; i++) {
u32 rxtx_ctrl, glue0;
int err;

err = esr_read_rxtx_ctrl(np, i, &rxtx_ctrl);
if (err)
Expand Down

0 comments on commit 7c34eb8

Please sign in to comment.