[SCSI] ncr53c8xx: div reaches -1
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 10 Jun 2009 19:56:57 +0000 (12:56 -0700)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 15 Jun 2009 15:09:30 +0000 (10:09 -0500)
With while(--div >= 0) { ... } div reaches -1.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/ncr53c8xx.c

index 3b7240e40819cb98a0024f031b964e306f17f990..e3c482aa87b53be2136cfa820ea7b1f222cca5cc 100644 (file)
@@ -5444,7 +5444,7 @@ static void ncr_getsync(struct ncb *np, u_char sfac, u_char *fakp, u_char *scntl
        **      input speed faster than the period.
        */
        kpc = per * clk;
-       while (--div >= 0)
+       while (--div > 0)
                if (kpc >= (div_10M[div] << 2)) break;
 
        /*