[MYRI_SBUS]: Prevent that myri_do_handshake lies about ticks.
authorRoel Kluin <12o3l@tiscali.nl>
Tue, 13 Nov 2007 11:16:17 +0000 (03:16 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Nov 2007 11:16:17 +0000 (03:16 -0800)
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>
drivers/net/myri_sbus.c

index 8d29319cc5cb39b88b3f13a37cb017bf28b595b2..656a260fc956b1cf52912da2b3c8aa108d7154c9 100644 (file)
@@ -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. */