提交 890c8c18 编写于 作者: R roel kluin 提交者: David S. Miller

net: Test off by one in sh_eth_reset()

If no break occurred, cnt reaches 0 after the loop.
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d2a928e4
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册