summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2015-12-16 18:12:06 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2015-12-21 22:06:36 -0500
commit9be321819c43417432a8376428b90fe3fe3a3510 (patch)
tree3c6e6b0eb3c5f064b0b791f750303f247560c3c6 /drivers
parent448193b5b5e2471fc90ea11e78c39bcfd167efb6 (diff)
downloadlinux-9be321819c43417432a8376428b90fe3fe3a3510.tar.gz
lpfc: Delete unnecessary checks before the function call "mempool_destroy"
The mempool_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Reviewed-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/lpfc/lpfc_mem.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_mem.c b/drivers/scsi/lpfc/lpfc_mem.c
index 3fa65338d3f5..4fb3581d4614 100644
--- a/drivers/scsi/lpfc/lpfc_mem.c
+++ b/drivers/scsi/lpfc/lpfc_mem.c
@@ -231,15 +231,13 @@ lpfc_mem_free(struct lpfc_hba *phba)
if (phba->lpfc_hbq_pool)
pci_pool_destroy(phba->lpfc_hbq_pool);
phba->lpfc_hbq_pool = NULL;
-
- if (phba->rrq_pool)
- mempool_destroy(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 && phba->active_rrq_pool) {
+ if (phba->sli_rev == LPFC_SLI_REV4) {
mempool_destroy(phba->active_rrq_pool);
phba->active_rrq_pool = NULL;
}