Re: [PATCH] scsi: lpfc: fix ioremap issues in 'lpfc_sli4_pci_mem_setup'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2023/4/3 17:16, Dan Carpenter wrote:
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)
  	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);
The test is reversed still.

Thanks for your review, Dan. Sorry for my internal careless review. Shuchang is creating a v2 patch to fix all the mentioned issues.

Really sorry about this stupid mistake.


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:
-	iounmap(phba->sli4_hba.ctrl_regs_memmap_p);
+	if (!phba->sli4_hba.ctrl_regs_memmap_p)
Also reversed.

+		iounmap(phba->sli4_hba.ctrl_regs_memmap_p);
  out_iounmap_conf:
  	iounmap(phba->sli4_hba.conf_regs_memmap_p);
regards,
dan carpenter





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux