Skip to content

Commit

Permalink
Revert "lpfc: Delete unnecessary checks before the function call memp…
Browse files Browse the repository at this point in the history
…ool_destroy"

This reverts commit 9be3218 which
caused a regression on hardware using the SLI3 interface.

Reported-by: Dick Kennedy <dick.kennedy@broadcom.com>
Cc: <stable@vger.kernel.org> # 4.6+
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <jejb@linux.vnet.ibm.com>
  • Loading branch information
Martin K. Petersen authored and James Bottomley committed May 11, 2016
1 parent 2bcbc81 commit d65c8ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/scsi/lpfc/lpfc_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d65c8ff

Please sign in to comment.