From: Roel Kluin Date: Wed, 25 Feb 2009 12:35:34 +0000 (+0100) Subject: wireless, wavelan: spin off by 1 X-Git-Tag: v2.6.30-rc1~662^2~356 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=b837e606d17a765f404175ae42a15ce17631e7d2;p=~emulex%2Finfiniband.git wireless, wavelan: spin off by 1 spin can reach -1 after the loop, so 0 is still success. Signed-off-by: Roel Kluin Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c index de717f8ffd6..1565a0a6097 100644 --- a/drivers/net/wireless/wavelan_cs.c +++ b/drivers/net/wireless/wavelan_cs.c @@ -838,9 +838,8 @@ wv_82593_cmd(struct net_device * dev, } while(((status & SR3_EXEC_STATE_MASK) != SR3_EXEC_IDLE) && (spin-- > 0)); - /* If the interrupt hasn't be posted */ - if(spin <= 0) - { + /* If the interrupt hasn't been posted */ + if (spin < 0) { #ifdef DEBUG_INTERRUPT_ERROR printk(KERN_INFO "wv_82593_cmd: %s timeout (previous command), status 0x%02x\n", str, status);