Commit d65c8fff authored by Martin K. Petersen's avatar Martin K. Petersen Committed by James Bottomley

Revert "lpfc: Delete unnecessary checks before the function call mempool_destroy"

This reverts commit 9be32181 which
caused a regression on hardware using the SLI3 interface.
Reported-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
Cc: <stable@vger.kernel.org> # 4.6+
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarJames Bottomley <jejb@linux.vnet.ibm.com>
parent 2bcbc814
...@@ -231,13 +231,15 @@ lpfc_mem_free(struct lpfc_hba *phba) ...@@ -231,13 +231,15 @@ lpfc_mem_free(struct lpfc_hba *phba)
if (phba->lpfc_hbq_pool) if (phba->lpfc_hbq_pool)
pci_pool_destroy(phba->lpfc_hbq_pool); pci_pool_destroy(phba->lpfc_hbq_pool);
phba->lpfc_hbq_pool = NULL; phba->lpfc_hbq_pool = NULL;
if (phba->rrq_pool)
mempool_destroy(phba->rrq_pool); mempool_destroy(phba->rrq_pool);
phba->rrq_pool = NULL; phba->rrq_pool = NULL;
/* Free NLP memory pool */ /* Free NLP memory pool */
mempool_destroy(phba->nlp_mem_pool); mempool_destroy(phba->nlp_mem_pool);
phba->nlp_mem_pool = NULL; 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); mempool_destroy(phba->active_rrq_pool);
phba->active_rrq_pool = NULL; phba->active_rrq_pool = NULL;
} }
......
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