diff options
author | roel kluin <roel.kluin@gmail.com> | 2009-12-30 02:43:45 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-04 06:42:53 +0100 |
commit | 890c8c18986eb975a76aa8359a712596bc70e61c (patch) | |
tree | 47ffd879a07fe8fbb6feeb22367ed8154246c786 /drivers/net/sh_eth.c | |
parent | niu: timeout ignored in tcam_wait_bit() (diff) | |
download | linux-890c8c18986eb975a76aa8359a712596bc70e61c.tar.xz linux-890c8c18986eb975a76aa8359a712596bc70e61c.zip |
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 '')
-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 */ |