diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-05-18 03:12:50 +0200 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-05-18 03:12:50 +0200 |
commit | e7ca7f9fa2cda220ba807620c992ce77c33a32ea (patch) | |
tree | fb8a6c1abc638c5a79645f4b9f44ece7c67187b4 /drivers/scsi/lpfc | |
parent | mpt3sas: Used "synchronize_irq()"API to synchronize timed-out IO & TMs (diff) | |
parent | Revert "lpfc: Delete unnecessary checks before the function call mempool_dest... (diff) | |
download | linux-e7ca7f9fa2cda220ba807620c992ce77c33a32ea.tar.xz linux-e7ca7f9fa2cda220ba807620c992ce77c33a32ea.zip |
Merge branch 'fixes' into misc
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_mem.c b/drivers/scsi/lpfc/lpfc_mem.c index 4fb3581d4614..3fa65338d3f5 100644 --- a/drivers/scsi/lpfc/lpfc_mem.c +++ b/drivers/scsi/lpfc/lpfc_mem.c @@ -231,13 +231,15 @@ lpfc_mem_free(struct lpfc_hba *phba) if (phba->lpfc_hbq_pool) pci_pool_destroy(phba->lpfc_hbq_pool); phba->lpfc_hbq_pool = NULL; - mempool_destroy(phba->rrq_pool); + + if (phba->rrq_pool) + mempool_destroy(phba->rrq_pool); phba->rrq_pool = NULL; /* Free NLP memory pool */ mempool_destroy(phba->nlp_mem_pool); phba->nlp_mem_pool = NULL; - if (phba->sli_rev == LPFC_SLI_REV4) { + if (phba->sli_rev == LPFC_SLI_REV4 && phba->active_rrq_pool) { mempool_destroy(phba->active_rrq_pool); phba->active_rrq_pool = NULL; } |