drivers/net: Remove pointless checks for NULL prior to calling kfree()

This commit is contained in:
Jesper Juhl
2005-10-28 16:53:13 -04:00
committed by Jeff Garzik
parent 7380a78a97
commit b4558ea93d
32 changed files with 90 additions and 174 deletions

View File

@@ -314,20 +314,16 @@ bnx2_free_mem(struct bnx2 *bp)
bp->tx_desc_ring, bp->tx_desc_mapping);
bp->tx_desc_ring = NULL;
}
if (bp->tx_buf_ring) {
kfree(bp->tx_buf_ring);
bp->tx_buf_ring = NULL;
}
kfree(bp->tx_buf_ring);
bp->tx_buf_ring = NULL;
if (bp->rx_desc_ring) {
pci_free_consistent(bp->pdev,
sizeof(struct rx_bd) * RX_DESC_CNT,
bp->rx_desc_ring, bp->rx_desc_mapping);
bp->rx_desc_ring = NULL;
}
if (bp->rx_buf_ring) {
kfree(bp->rx_buf_ring);
bp->rx_buf_ring = NULL;
}
kfree(bp->rx_buf_ring);
bp->rx_buf_ring = NULL;
}
static int