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>
This commit is contained in:
roel kluin 2009-12-30 01:43:45 +00:00 committed by David S. Miller
parent d2a928e4bf
commit 890c8c1898

View File

@ -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 */