ioremap balanced with iounmap for drivers/scsi/fdomain.c
PATCH 22/36 ioremap balanced with iounmap for drivers/scsi/fdomain.c
From: Amol Lad <[email protected]>
ioremap must be balanced by an iounmap and failing to do so can result in a memory leak.
Signed-off-by Amol Lad <[email protected]>
Cc James Bottomley <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/scsi/fdomain.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-)
drivers/scsi/fdomain.c renamed from drivers/scsi/fdomain.c~ioremap-balanced-with-iounmap-drivers-scsi-fdomainc +5 -1
@@ -779,7 +779,11 @@ found: else printk( " FAILURE\n" );#endif -if (!flag)return 0 ;/* iobase not found */ +if (!flag) { +if (bios_mem) +iounmap (bios_mem); +return 0 ;/* iobase not found */ + } *irq =fdomain_get_irq ( base ); *iobase = base;
_