From: James Smart <james.smart@broadcom.com>
To: Saurav Girepunje <saurav.girepunje@gmail.com>,
dick.kennedy@broadcom.com, jejb@linux.ibm.com,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: saurav.girepunje@hotmail.com
Subject: Re: [PATCH] scsi: lpfc: Fix NULL check before mempool_destroy is not needed
Date: Mon, 28 Oct 2019 10:42:33 -0700 [thread overview]
Message-ID: <7fb64c36-52aa-ab69-0637-9abfe3fdf19b@broadcom.com> (raw)
In-Reply-To: <20191026194712.GA22249@saurav>
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
next parent reply other threads:[~2019-10-28 17:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191026194712.GA22249@saurav>
2019-10-28 17:42 ` James Smart [this message]
2019-10-29 1:53 ` [PATCH] scsi: lpfc: Fix NULL check before mempool_destroy is not needed Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7fb64c36-52aa-ab69-0637-9abfe3fdf19b@broadcom.com \
--to=james.smart@broadcom.com \
--cc=dick.kennedy@broadcom.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=saurav.girepunje@gmail.com \
--cc=saurav.girepunje@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox