]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - drivers/net/bcm63xx_enet.c
bcm63xx_enet: timeout off by one in do_mdio_op()
[linux-2.6.git] / drivers / net / bcm63xx_enet.c
index 09d270913c5041f866537f9e7c4ae6d3a3d976c8..ba29dc319b34860b651696b929b8af908b0b8428 100644 (file)
@@ -90,7 +90,7 @@ static int do_mdio_op(struct bcm_enet_priv *priv, unsigned int data)
                if (enet_readl(priv, ENET_IR_REG) & ENET_IR_MII)
                        break;
                udelay(1);
-       } while (limit-- >= 0);
+       } while (limit-- > 0);
 
        return (limit < 0) ? 1 : 0;
 }