From: Saurav Girepunje <saurav.girepunje@gmail.com>
Date: Sun, 27 Oct 2019 01:17:17 +0530
Subject: scsi: lpfc: Fix NULL check before mempool_destroy is not needed
Patch-mainline: v5.5-rc1
Git-commit: c3e5aac3e2f501ad4fcb03fed0e32a6f009faea2
References: bsc#1154601
mempool_destroy has taken null pointer check into account. Remove the
redundant check.
Link: https://lore.kernel.org/r/20191026194712.GA22249@saurav
Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Daniel Wagner <dwagner@suse.de>
---
drivers/scsi/lpfc/lpfc_init.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -13470,8 +13470,7 @@ lpfc_sli4_oas_verify(struct lpfc_hba *ph
phba->cfg_fof = 1;
} else {
phba->cfg_fof = 0;
- if (phba->device_data_mem_pool)
- mempool_destroy(phba->device_data_mem_pool);
+ mempool_destroy(phba->device_data_mem_pool);
phba->device_data_mem_pool = NULL;
}