On Mon, Apr 03, 2023 at 03:48:21PM +0800, lishuchang@xxxxxxxxxxx wrote:
@@ -12069,9 +12069,11 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba *phba)The test is reversed still.
return 0;
out_iounmap_all:
- iounmap(phba->sli4_hba.drbl_regs_memmap_p);
+ if (!phba->sli4_hba.drbl_regs_memmap_p)
+ iounmap(phba->sli4_hba.drbl_regs_memmap_p);
If you make a mistake, you should write a static checker warning so that
you never make the same mistake again. ;) See attached.
out_iounmap_ctrl:Also reversed.
- iounmap(phba->sli4_hba.ctrl_regs_memmap_p);
+ if (!phba->sli4_hba.ctrl_regs_memmap_p)
+ iounmap(phba->sli4_hba.ctrl_regs_memmap_p);regards,
out_iounmap_conf:
iounmap(phba->sli4_hba.conf_regs_memmap_p);
dan carpenter