hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/scsi/lpfc/lpfc_init.c
....@@ -10477,7 +10477,7 @@
1047710477 goto out_iounmap_all;
1047810478 } else {
1047910479 error = -ENOMEM;
10480
- goto out_iounmap_all;
10480
+ goto out_iounmap_ctrl;
1048110481 }
1048210482 }
1048310483
....@@ -10495,7 +10495,7 @@
1049510495 dev_err(&pdev->dev,
1049610496 "ioremap failed for SLI4 HBA dpp registers.\n");
1049710497 error = -ENOMEM;
10498
- goto out_iounmap_ctrl;
10498
+ goto out_iounmap_all;
1049910499 }
1050010500 phba->pci_bar4_memmap_p = phba->sli4_hba.dpp_regs_memmap_p;
1050110501 }
....@@ -10520,9 +10520,11 @@
1052010520 return 0;
1052110521
1052210522 out_iounmap_all:
10523
- iounmap(phba->sli4_hba.drbl_regs_memmap_p);
10523
+ if (phba->sli4_hba.drbl_regs_memmap_p)
10524
+ iounmap(phba->sli4_hba.drbl_regs_memmap_p);
1052410525 out_iounmap_ctrl:
10525
- iounmap(phba->sli4_hba.ctrl_regs_memmap_p);
10526
+ if (phba->sli4_hba.ctrl_regs_memmap_p)
10527
+ iounmap(phba->sli4_hba.ctrl_regs_memmap_p);
1052610528 out_iounmap_conf:
1052710529 iounmap(phba->sli4_hba.conf_regs_memmap_p);
1052810530