net: Test off by one in sh_eth_reset()
Subsystems (2)
PATCH 1/1 net: Test off by one in sh_eth_reset()
If no break occurred, cnt reaches 0 after the loop.
Signed-off-by Roel Kluin <[email protected]>
--- drivers/net/sh_eth.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/sh_eth.c +1 -1
@@ -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 */
From: Roel Kluin <[email protected]>
Date: Wed, 30 Dec 2009 12:43:45 +0100
Quoted 3 lines
If no break occurred, cnt reaches 0 after the loop.
Signed-off-by Roel Kluin <[email protected]>
Applied.