Re: [PATCH v2 1/3] scsi: lpfc: Fix memory leak in lpfc_config_port_post()
From: Zilin Guan
Date: Wed Dec 31 2025 - 10:07:07 EST
On Tue, Dec 30, 2025 at 05:01:32PM+0100, Markus Elfring wrote:
> …
> > +++ b/drivers/scsi/lpfc/lpfc_init.c
> …
> > @@ -550,8 +549,7 @@ lpfc_config_port_post(struct lpfc_hba *phba)
> > if (phba->intr_type == MSIX) {
> > rc = lpfc_config_msi(phba, pmb);
> > if (rc) {
> > - mempool_free(pmb, phba->mbox_mem_pool);
> > - return -EIO;
> > + goto out_free;
> > }
>
> You may omit curly brackets here.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.19-rc3#n197
Hi Markus,
Thanks for the review.
I missed this one during the refactoring. I will remove the unnecessary
braces in v3.
Best regards,
Zilin Guan