smsc9420: prevent BUG() if ethtool is called with interface down
[linux-2.6-block.git] / 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;
 
        /*