diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2016-05-09 21:39:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-07 18:18:49 -0700 |
commit | 3c70550d8a10e600bf02c7bdb5c46ba782548288 (patch) | |
tree | dcad090dc484885c8897e53761a013d3b17a0e8e | |
parent | 85e29271c3a3942f6e7e453c8dae22c6210b8f03 (diff) | |
download | lwn-3c70550d8a10e600bf02c7bdb5c46ba782548288.tar.gz lwn-3c70550d8a10e600bf02c7bdb5c46ba782548288.zip |
Revert "lpfc: Delete unnecessary checks before the function call mempool_destroy"
commit d65c8fff867a6450c58ce31572e883148a445ddf upstream.
This reverts commit 9be321819c43417432a8376428b90fe3fe3a3510 which
caused a regression on hardware using the SLI3 interface.
Reported-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <jejb@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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; } |