aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sh_eth.c
diff options
context:
space:
mode:
authorroel kluin <roel.kluin@gmail.com>2009-12-29 20:43:45 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-04 00:42:53 -0500
commit890c8c18986eb975a76aa8359a712596bc70e61c (patch)
tree47ffd879a07fe8fbb6feeb22367ed8154246c786 /drivers/net/sh_eth.c
parentd2a928e4bfc75170af641f073475fc974cf176c2 (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/sh_eth.c')
-rw-r--r--drivers/net/sh_eth.c2
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 */