BOOTMEM_DEFAULT would allow multiple reservations for the same location,
we need to reserve the region for our exclusive use. Also check if the
reserve succeeded.
Signed-off-by: Imre Deak <imre.deak@nokia.com>
return;
}
- reserve_bootmem(paddr, size, BOOTMEM_DEFAULT);
+ if (reserve_bootmem(paddr, size, BOOTMEM_EXCLUSIVE) < 0) {
+ pr_err("FB: failed to reserve VRAM\n");
+ return;
+ }
} else {
if (size > sdram_size) {
printk(KERN_ERR "Illegal SDRAM size for VRAM\n");