From: Andrew Lunn Date: Mon, 21 Nov 2016 22:26:56 +0000 (+0100) Subject: net: dsa: mv88e6xxx: Fix unused variable warning by using variable X-Git-Tag: v4.14-rc1~1973^2~204^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=096eea0ff83bcdd14d77fb4efc0ffc2b548d4a5d;p=platform%2Fkernel%2Flinux-rpi3.git 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 Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller --- diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 062b912..c015212 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; }