linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] scsi: lpfc: Fix NULL check before mempool_destroy is not needed
       [not found] <20191026194712.GA22249@saurav>
@ 2019-10-28 17:42 ` James Smart
  2019-10-29  1:53 ` Martin K. Petersen
  1 sibling, 0 replies; 2+ messages in thread
From: James Smart @ 2019-10-28 17:42 UTC (permalink / raw)
  To: Saurav Girepunje, dick.kennedy, jejb, martin.petersen,
	linux-scsi, linux-kernel
  Cc: saurav.girepunje

On 10/26/2019 12:47 PM, Saurav Girepunje wrote:
> mempool_destroy has taken null pointer check into account.
> so remove the redundant check.
>
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
> ---
>   drivers/scsi/lpfc/lpfc_init.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
> index e91377a4cafe..f620ecae3428 100644
> --- a/drivers/scsi/lpfc/lpfc_init.c
> +++ b/drivers/scsi/lpfc/lpfc_init.c
> @@ -13346,8 +13346,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;
>   	}
>   
Looks fine.

Thanks

Reviewed-by:  James Smart <james.smart@broadcom.com>

-- james


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: lpfc: Fix NULL check before mempool_destroy is not needed
       [not found] <20191026194712.GA22249@saurav>
  2019-10-28 17:42 ` [PATCH] scsi: lpfc: Fix NULL check before mempool_destroy is not needed James Smart
@ 2019-10-29  1:53 ` Martin K. Petersen
  1 sibling, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2019-10-29  1:53 UTC (permalink / raw)
  To: Saurav Girepunje
  Cc: james.smart, dick.kennedy, jejb, martin.petersen, linux-scsi,
	linux-kernel, saurav.girepunje, saurav.girepunje


Saurav,

> mempool_destroy has taken null pointer check into account.  so remove
> the redundant check.

Applied to 5.5/scsi-queue, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-29  1:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20191026194712.GA22249@saurav>
2019-10-28 17:42 ` [PATCH] scsi: lpfc: Fix NULL check before mempool_destroy is not needed James Smart
2019-10-29  1:53 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).