Skip to content

Commit

Permalink
net: Test off by one in sh_eth_reset()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
roel kluin authored and David S. Miller committed Jan 4, 2010
1 parent d2a928e commit 890c8c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/sh_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 890c8c1

Please sign in to comment.