Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 890c8c18 authored by roel kluin's avatar roel kluin Committed by David S. Miller
Browse files

net: Test off by one in sh_eth_reset()



If no break occurred, cnt reaches 0 after the loop.

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d2a928e4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 */