Skip to content

Commit

Permalink
bnx2: Fix bug in bnx2_free_rx_mem().
Browse files Browse the repository at this point in the history
DMA memory for the jumbo rx page rings was freed incorrectly using the
wrong local variable as the array index.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael Chan authored and David S. Miller committed Dec 18, 2008
1 parent 69c30e1 commit 3298a73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,9 +543,9 @@ bnx2_free_rx_mem(struct bnx2 *bp)
for (j = 0; j < bp->rx_max_pg_ring; j++) {
if (rxr->rx_pg_desc_ring[j])
pci_free_consistent(bp->pdev, RXBD_RING_SIZE,
rxr->rx_pg_desc_ring[i],
rxr->rx_pg_desc_mapping[i]);
rxr->rx_pg_desc_ring[i] = NULL;
rxr->rx_pg_desc_ring[j],
rxr->rx_pg_desc_mapping[j]);
rxr->rx_pg_desc_ring[j] = NULL;
}
if (rxr->rx_pg_ring)
vfree(rxr->rx_pg_ring);
Expand Down

0 comments on commit 3298a73

Please sign in to comment.