提交 9f8c4265 编写于 作者: S Sergei Shtylyov 提交者: David S. Miller

sh_eth: fix result of sh_eth_check_reset() on timeout

When  the first loop in sh_eth_check_reset() runs to its end, 'cnt' is 0, so the
following check for 'cnt < 0' fails to catch the timeout.  Fix the  condition in
this check, so that the timeout  is actually reported.
While at it, fix the grammar in the failure message...
Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 2786aae7
......@@ -897,8 +897,8 @@ static int sh_eth_check_reset(struct net_device *ndev)
mdelay(1);
cnt--;
}
if (cnt < 0) {
pr_err("Device reset fail\n");
if (cnt <= 0) {
pr_err("Device reset failed\n");
ret = -ETIMEDOUT;
}
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册