diff options
| -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) | |||
| 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 | } |
