Commit 58d29e3c authored by Julia Lawall's avatar Julia Lawall Committed by David S. Miller

atm: he: drop null test before destroy functions

Remove unneeded NULL test.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression x; @@
-if (x != NULL)
  \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x);
// </smpl>
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 982b5270
...@@ -1578,8 +1578,6 @@ he_stop(struct he_dev *he_dev) ...@@ -1578,8 +1578,6 @@ he_stop(struct he_dev *he_dev)
kfree(he_dev->rbpl_virt); kfree(he_dev->rbpl_virt);
kfree(he_dev->rbpl_table); kfree(he_dev->rbpl_table);
if (he_dev->rbpl_pool)
dma_pool_destroy(he_dev->rbpl_pool); dma_pool_destroy(he_dev->rbpl_pool);
if (he_dev->rbrq_base) if (he_dev->rbrq_base)
...@@ -1594,7 +1592,6 @@ he_stop(struct he_dev *he_dev) ...@@ -1594,7 +1592,6 @@ he_stop(struct he_dev *he_dev)
dma_free_coherent(&he_dev->pci_dev->dev, CONFIG_TBRQ_SIZE * sizeof(struct he_tbrq), dma_free_coherent(&he_dev->pci_dev->dev, CONFIG_TBRQ_SIZE * sizeof(struct he_tbrq),
he_dev->tpdrq_base, he_dev->tpdrq_phys); he_dev->tpdrq_base, he_dev->tpdrq_phys);
if (he_dev->tpd_pool)
dma_pool_destroy(he_dev->tpd_pool); dma_pool_destroy(he_dev->tpd_pool);
if (he_dev->pci_dev) { if (he_dev->pci_dev) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment