aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-11-21 23:26:56 +0100
committerDavid S. Miller <davem@davemloft.net>2016-11-22 09:55:30 -0500
commit096eea0ff83bcdd14d77fb4efc0ffc2b548d4a5d (patch)
tree8cad42b7308ac35b94bab8ea257f1e9e86ff6c29
parentnet: dsa: mv88e6xxx: Take switch out of reset before probe (diff)
downloadlinux-dev-096eea0ff83bcdd14d77fb4efc0ffc2b548d4a5d.tar.xz
linux-dev-096eea0ff83bcdd14d77fb4efc0ffc2b548d4a5d.zip
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.c3
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;
}