net: variables reach -1, but 0 tested
[sfrench/cifs-2.6.git] / drivers / net / smc911x.c
index bf3aa2a1effed6fa6301fc675d01bbf33e9d72fd..223cde0d43be8a6674f956cea35e3a490530cfdb 100644 (file)
@@ -220,9 +220,9 @@ static void smc911x_reset(struct net_device *dev)
 
        /* make sure EEPROM has finished loading before setting GPIO_CFG */
        timeout=1000;
-       while ( timeout-- && (SMC_GET_E2P_CMD(lp) & E2P_CMD_EPC_BUSY_)) {
+       while (--timeout && (SMC_GET_E2P_CMD(lp) & E2P_CMD_EPC_BUSY_))
                udelay(10);
-       }
+
        if (timeout == 0){
                PRINTK("%s: smc911x_reset timeout waiting for EEPROM busy\n", dev->name);
                return;