diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-02-22 08:46:36 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-22 08:46:36 +0100 |
commit | b956d41162b1f2c4b446107e9910e4719cbc75f4 (patch) | |
tree | 38092786b3c0f0e599e209897f485dee9252c78a /drivers/net/sunlance.c | |
parent | sungem: another error printed one too early (diff) | |
download | linux-b956d41162b1f2c4b446107e9910e4719cbc75f4.tar.xz linux-b956d41162b1f2c4b446107e9910e4719cbc75f4.zip |
sunlance: Beyond ARRAY_SIZE of ib->btx_ring
Do not go beyond ARRAY_SIZE of ib->btx_ring
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/sunlance.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index 281373281756..16c528db7251 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; @@ -399,7 +399,7 @@ static void lance_init_ring_pio(struct net_device *dev) sbus_writeb(dev->dev_addr[4], &ib->phys_addr[5]); /* Setup the Tx ring entries */ - for (i = 0; i <= TX_RING_SIZE; i++) { + for (i = 0; i < TX_RING_SIZE; i++) { leptr = libbuff_offset(tx_buf, i); sbus_writew(leptr, &ib->btx_ring [i].tmd0); sbus_writeb(leptr >> 16,&ib->btx_ring [i].tmd1_hadr); |