From: Thomas Gleixner Date: Wed, 30 Jan 2008 12:34:05 +0000 (+0100) Subject: x86: use remove_vm_are in ioremap_32 error path X-Git-Tag: v2.6.25-rc1~1143^2~61 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4c1b977f0036c00ebabb60375cb63d0de9d43fa;p=linux-2.6 x86: use remove_vm_are in ioremap_32 error path When ioremap_page_range fails, then we can use remove_vm_area instead of vunmap safely. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/mm/ioremap_32.c b/arch/x86/mm/ioremap_32.c index 5273ac4aa9..4d919c37d1 100644 --- a/arch/x86/mm/ioremap_32.c +++ b/arch/x86/mm/ioremap_32.c @@ -118,7 +118,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, addr = (void __iomem *) area->addr; if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size, phys_addr, pgprot)) { - vunmap((void __force *) addr); + remove_vm_area((void *)(PAGE_MASK & (unsigned long) addr)); return NULL; }