From: Roel Kluin <12o3l@tiscali.nl> Date: Tue, 13 Nov 2007 11:16:17 +0000 (-0800) Subject: [MYRI_SBUS]: Prevent that myri_do_handshake lies about ticks. X-Git-Tag: v2.6.24-rc3~145^2~4 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9db7720cca8f55a1e0c8d0dc1587e35dca50afbf;p=linux-2.6-omap-h63xx.git [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 <12o3l@tiscali.nl> Signed-off-by: David S. Miller --- diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index 8d29319cc5c..656a260fc95 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c @@ -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. */