forked from luck/tmp_suning_uos_patched
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:
parent
d2a928e4bf
commit
890c8c1898
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue
Block a user