projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2a928e
)
net: Test off by one in sh_eth_reset()
author
roel kluin
<roel.kluin@gmail.com>
Wed, 30 Dec 2009 01:43:45 +0000
(
01:43
+0000)
committer
David S. Miller
<davem@davemloft.net>
Mon, 4 Jan 2010 05:42:53 +0000
(21:42 -0800)
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>
drivers/net/sh_eth.c
patch
|
blob
|
history
diff --git
a/drivers/net/sh_eth.c
b/drivers/net/sh_eth.c
index ca6285016dfd633633c70605c296e703f40c5ee7..7402b858cab7f306a77fa2922bb38fb1e5d719eb 100644
(file)
--- 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)
mdelay(1);
cnt--;
}
- if (cnt
<
0)
+ if (cnt
==
0)
printk(KERN_ERR "Device reset fail\n");
/* Table Init */