diff options
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 3a2ace01e444..11d252318221 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -314,20 +314,16 @@ bnx2_free_mem(struct bnx2 *bp) | |||
314 | bp->tx_desc_ring, bp->tx_desc_mapping); | 314 | bp->tx_desc_ring, bp->tx_desc_mapping); |
315 | bp->tx_desc_ring = NULL; | 315 | bp->tx_desc_ring = NULL; |
316 | } | 316 | } |
317 | if (bp->tx_buf_ring) { | 317 | kfree(bp->tx_buf_ring); |
318 | kfree(bp->tx_buf_ring); | 318 | bp->tx_buf_ring = NULL; |
319 | bp->tx_buf_ring = NULL; | ||
320 | } | ||
321 | if (bp->rx_desc_ring) { | 319 | if (bp->rx_desc_ring) { |
322 | pci_free_consistent(bp->pdev, | 320 | pci_free_consistent(bp->pdev, |
323 | sizeof(struct rx_bd) * RX_DESC_CNT, | 321 | sizeof(struct rx_bd) * RX_DESC_CNT, |
324 | bp->rx_desc_ring, bp->rx_desc_mapping); | 322 | bp->rx_desc_ring, bp->rx_desc_mapping); |
325 | bp->rx_desc_ring = NULL; | 323 | bp->rx_desc_ring = NULL; |
326 | } | 324 | } |
327 | if (bp->rx_buf_ring) { | 325 | kfree(bp->rx_buf_ring); |
328 | kfree(bp->rx_buf_ring); | 326 | bp->rx_buf_ring = NULL; |
329 | bp->rx_buf_ring = NULL; | ||
330 | } | ||
331 | } | 327 | } |
332 | 328 | ||
333 | static int | 329 | static int |