Commit e4c1b977 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar

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: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 4b40fcee
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment