aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2016-05-09 21:39:43 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2016-05-11 16:02:43 -0400
commitd65c8fff867a6450c58ce31572e883148a445ddf (patch)
tree34dc1ab6b5a3e5072fea59bfb20d46b05c17603a
parent2bcbc81421c511ef117cadcf0bee9c4340e68db0 (diff)
Revert "lpfc: Delete unnecessary checks before the function call mempool_destroy"
This reverts commit 9be321819c43417432a8376428b90fe3fe3a3510 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>
-rw-r--r--drivers/scsi/lpfc/lpfc_mem.c6
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)
231 if (phba->lpfc_hbq_pool) 231 if (phba->lpfc_hbq_pool)
232 pci_pool_destroy(phba->lpfc_hbq_pool); 232 pci_pool_destroy(phba->lpfc_hbq_pool);
233 phba->lpfc_hbq_pool = NULL; 233 phba->lpfc_hbq_pool = NULL;
234 mempool_destroy(phba->rrq_pool); 234
235 if (phba->rrq_pool)
236 mempool_destroy(phba->rrq_pool);
235 phba->rrq_pool = NULL; 237 phba->rrq_pool = NULL;
236 238
237 /* Free NLP memory pool */ 239 /* Free NLP memory pool */
238 mempool_destroy(phba->nlp_mem_pool); 240 mempool_destroy(phba->nlp_mem_pool);
239 phba->nlp_mem_pool = NULL; 241 phba->nlp_mem_pool = NULL;
240 if (phba->sli_rev == LPFC_SLI_REV4) { 242 if (phba->sli_rev == LPFC_SLI_REV4 && phba->active_rrq_pool) {
241 mempool_destroy(phba->active_rrq_pool); 243 mempool_destroy(phba->active_rrq_pool);
242 phba->active_rrq_pool = NULL; 244 phba->active_rrq_pool = NULL;
243 } 245 }