Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 096eea0f authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller
Browse files

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: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b4308f04
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -787,6 +787,9 @@ static int _mv88e6xxx_stats_wait(struct mv88e6xxx_chip *chip)


	for (i = 0; i < 10; i++) {
	for (i = 0; i < 10; i++) {
		err = mv88e6xxx_g1_read(chip, GLOBAL_STATS_OP, &val);
		err = mv88e6xxx_g1_read(chip, GLOBAL_STATS_OP, &val);
		if (err)
			return err;

		if ((val & GLOBAL_STATS_OP_BUSY) == 0)
		if ((val & GLOBAL_STATS_OP_BUSY) == 0)
			return 0;
			return 0;
	}
	}