Skip to content

Commit 9db7720

Browse files
Roel Kluindavem330
authored andcommitted
[MYRI_SBUS]: Prevent that myri_do_handshake lies about ticks.
With '<=' tick can be incremented up to 26, The last loop is redundant since even when 'softstate' becomes 'STATE_READY', 'if (tick > 25)' will still cause the function to return -1, Signed-off-by: Roel Kluin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 81d9dda commit 9db7720

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/myri_sbus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static int myri_do_handshake(struct myri_eth *mp)
134134

135135
myri_disable_irq(mp->lregs, cregs);
136136

137-
while (tick++ <= 25) {
137+
while (tick++ < 25) {
138138
u32 softstate;
139139

140140
/* Wake it up. */

0 commit comments

Comments
 (0)