From: Saurav Girepunje Date: Sat, 26 Oct 2019 19:47:17 +0000 (+0530) Subject: scsi: lpfc: Fix NULL check before mempool_destroy is not needed X-Git-Tag: v5.10.7~3666^2~129 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3e5aac3e2f501ad4fcb03fed0e32a6f009faea2;p=platform%2Fkernel%2Flinux-rpi.git scsi: lpfc: Fix NULL check before mempool_destroy is not needed 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 Reviewed-by: James Smart Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 9536ad3..ec9dbc0 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -13464,8 +13464,7 @@ lpfc_sli4_oas_verify(struct lpfc_hba *phba) 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; }