Subject: [PATCH] X:beyond ARRAY_SIZE of ib->btx_ring

From: Roel Kluin <[email-masked]>
Date: Thu, 21 May 2009 22:28:13 +0200

Do not go beyond ARRAY_SIZE of ib->btx_ring

Signed-off-by: Roel Kluin <[email-masked]>
---
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c
index 704301a..aa2a4ef 100644
--- a/drivers/net/sunlance.c
+++ b/drivers/net/sunlance.c
@@ -343,7 +343,7 @@ static void lance_init_ring_dvma(struct net_device *dev)
 	ib->phys_addr [5] = dev->dev_addr [4];
 
 	/* Setup the Tx ring entries */
-	for (i = 0; i <= TX_RING_SIZE; i++) {
+	for (i = 0; i < TX_RING_SIZE; i++) {
 		leptr = LANCE_ADDR(aib + libbuff_offset(tx_buf, i));
 		ib->btx_ring [i].tmd0      = leptr;
 		ib->btx_ring [i].tmd1_hadr = leptr >> 16;