diff options
author | roel kluin <roel.kluin@gmail.com> | 2009-12-30 01:43:45 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-03 21:42:53 -0800 |
commit | 890c8c18986eb975a76aa8359a712596bc70e61c (patch) | |
tree | 47ffd879a07fe8fbb6feeb22367ed8154246c786 /drivers/net | |
parent | d2a928e4bfc75170af641f073475fc974cf176c2 (diff) |
net: Test off by one in sh_eth_reset()
If no break occurred, cnt reaches 0 after the loop.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/sh_eth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index ca6285016dfd..7402b858cab7 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -110,7 +110,7 @@ static void sh_eth_reset(struct net_device *ndev) mdelay(1); cnt--; } - if (cnt < 0) + if (cnt == 0) printk(KERN_ERR "Device reset fail\n"); /* Table Init */ |