Commit 26bfc540 authored by Wang YanQing's avatar Wang YanQing Committed by Ingo Molnar

x86/mm/gart: Drop unnecessary check

The memblock_find_in_range() return value addr is guaranteed
to be within "addr + aper_size" and not beyond GART_MAX_ADDR.
Signed-off-by: default avatarWang YanQing <udknight@gmail.com>
Cc: yinghai@kernel.org
Link: http://lkml.kernel.org/r/20130416013734.GA14641@udknightSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 587ff8c4
...@@ -87,7 +87,7 @@ static u32 __init allocate_aperture(void) ...@@ -87,7 +87,7 @@ static u32 __init allocate_aperture(void)
*/ */
addr = memblock_find_in_range(GART_MIN_ADDR, GART_MAX_ADDR, addr = memblock_find_in_range(GART_MIN_ADDR, GART_MAX_ADDR,
aper_size, aper_size); aper_size, aper_size);
if (!addr || addr + aper_size > GART_MAX_ADDR) { if (!addr) {
printk(KERN_ERR printk(KERN_ERR
"Cannot allocate aperture memory hole (%lx,%uK)\n", "Cannot allocate aperture memory hole (%lx,%uK)\n",
addr, aper_size>>10); addr, aper_size>>10);
......
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