diff options
author | Andrew Lunn <andrew@lunn.ch> | 2016-11-22 01:26:56 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-22 17:55:30 +0300 |
commit | 096eea0ff83bcdd14d77fb4efc0ffc2b548d4a5d (patch) | |
tree | 8cad42b7308ac35b94bab8ea257f1e9e86ff6c29 | |
parent | b4308f046a38dffc270b8865256320cbe2a2b1f8 (diff) | |
download | linux-096eea0ff83bcdd14d77fb4efc0ffc2b548d4a5d.tar.xz |
net: dsa: mv88e6xxx: Fix unused variable warning by using variable
_mv88e6xxx_stats_wait() did not check the return value from
mv88e6xxx_g1_read(), so the compiler complained about set but unused
err.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 062b9128a58d..c0152125680f 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -787,6 +787,9 @@ static int _mv88e6xxx_stats_wait(struct mv88e6xxx_chip *chip) for (i = 0; i < 10; i++) { err = mv88e6xxx_g1_read(chip, GLOBAL_STATS_OP, &val); + if (err) + return err; + if ((val & GLOBAL_STATS_OP_BUSY) == 0) return 0; } |