Skip to content

Commit

Permalink
x86: use remove_vm_are in ioremap_32 error path
Browse files Browse the repository at this point in the history
When ioremap_page_range fails, then we can use remove_vm_area instead
of vunmap safely.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Jan 30, 2008
1 parent 4b40fce commit e4c1b97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/mm/ioremap_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e4c1b97

Please sign in to comment.