[PATCH] iounmap after ioremap in efi_enter_virtual_mode, file arch/ia64/kernel/efi.c

From: Roel Kluin <12o3l_at_tiscali.nl>
Date: 2007-11-04 10:30:14
I am less certain about this one, so please review
--
Iounmap when EFI won't switch to virtual mode

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 3f7ea13..af925ab 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -585,6 +585,8 @@ efi_enter_virtual_mode (void)
 			       efi_desc_size, ia64_boot_param->efi_memdesc_version,
 			       ia64_boot_param->efi_memmap);
 	if (status != EFI_SUCCESS) {
+		if ((md->attribute & EFI_MEMORY_UC) || (md->attribute & EFI_MEMORY_WC))
+			iounmap(md->virt_addr);
 		printk(KERN_WARNING "warning: unable to switch EFI into virtual mode "
 		       "(status=%lu)\n", status);
 		return;
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sun Nov 04 10:30:31 2007

This archive was generated by hypermail 2.1.8 : 2007-11-04 10:30:52 EST