Re: [PATCH v2 1/3] scsi: lpfc: Fix memory leak in lpfc_config_port_post()
From: Markus Elfring
Date: Tue Dec 30 2025 - 11:01:46 EST
…
> +++ 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
> rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL);
> if (rc != MBX_SUCCESS) {
…
Regards,
Markus