diff options
author | roel kluin <roel.kluin@gmail.com> | 2009-12-29 20:43:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-04 00:42:53 -0500 |
commit | 890c8c18986eb975a76aa8359a712596bc70e61c (patch) | |
tree | 47ffd879a07fe8fbb6feeb22367ed8154246c786 /drivers | |
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')
-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) | |||
110 | mdelay(1); | 110 | mdelay(1); |
111 | cnt--; | 111 | cnt--; |
112 | } | 112 | } |
113 | if (cnt < 0) | 113 | if (cnt == 0) |
114 | printk(KERN_ERR "Device reset fail\n"); | 114 | printk(KERN_ERR "Device reset fail\n"); |
115 | 115 | ||
116 | /* Table Init */ | 116 | /* Table Init */ |