Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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 <davem@davemloft.net>

authored by

Roel Kluin and committed by
David S. Miller
9db7720c 81d9ddae

+1 -1
+1 -1
drivers/net/myri_sbus.c
··· 134 134 135 135 myri_disable_irq(mp->lregs, cregs); 136 136 137 - while (tick++ <= 25) { 137 + while (tick++ < 25) { 138 138 u32 softstate; 139 139 140 140 /* Wake it up. */