summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorroel kluin <roel.kluin@gmail.com>2009-09-21 14:08:48 +0400
committerDavid S. Miller <davem@davemloft.net>2009-10-01 07:03:15 +0400
commitec1652af18ef02c7c6ceeabb64f56f16eaf40ae9 (patch)
tree94596543902a232043993a3de5b2999a2b127b82 /drivers/net
parentebd6e7744f26b1a0e10d8a46ee57a3e76ceec6f9 (diff)
downloadlinux-ec1652af18ef02c7c6ceeabb64f56f16eaf40ae9.tar.xz
bcm63xx_enet: timeout off by one in do_mdio_op()
`while (limit-- >= 0)' reaches -2 after the loop upon timeout. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bcm63xx_enet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c
index 09d270913c50..ba29dc319b34 100644
--- a/drivers/net/bcm63xx_enet.c
+++ b/drivers/net/bcm63xx_enet.c
@@ -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;
}