Skip to content

Commit

Permalink
[MYRI_SBUS]: Prevent that myri_do_handshake lies about ticks.
Browse files Browse the repository at this point in the history
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 <12o3l@tiscali.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Roel Kluin authored and David S. Miller committed Nov 13, 2007
1 parent 81d9dda commit 9db7720
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/myri_sbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static int myri_do_handshake(struct myri_eth *mp)

myri_disable_irq(mp->lregs, cregs);

while (tick++ <= 25) {
while (tick++ < 25) {
u32 softstate;

/* Wake it up. */
Expand Down

0 comments on commit 9db7720

Please sign in to comment.