[patch 19/45] ioremap balanced with iounmap for drivers/scsi/qlogicpti.c

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

 



From: Amol Lad <amol@xxxxxxxxxxxxxxxxxxx>

ioremap must be balanced by an iounmap and failing to do so can result in a
memory leak.

Signed-off-by: Amol Lad <amol@xxxxxxxxxxxxxxxxxxx>
Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/scsi/qlogicpti.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN drivers/scsi/qlogicpti.c~ioremap-balanced-with-iounmap-drivers-scsi-qlogicptic drivers/scsi/qlogicpti.c
--- a/drivers/scsi/qlogicpti.c~ioremap-balanced-with-iounmap-drivers-scsi-qlogicptic
+++ a/drivers/scsi/qlogicpti.c
@@ -699,6 +699,7 @@ static int __init qpti_map_regs(struct q
 					  "PTI Qlogic/ISP statreg");
 		if (!qpti->sreg) {
 			printk("PTI: Qlogic/ISP status register is unmappable\n");
+			sbus_iounmap(qpti->qregs, qpti->sdev->reg_addrs[0].reg_size);
 			return -1;
 		}
 	}
_
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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