Checking the return value of methods is always a good idea. This fixes a KDL I'm getting on start with vmware when including the acpi module in the build. Now, finding why this happens in the first place would be nice.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27777 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3bb8984f7c
commit
d6a7cd2564
@ -509,8 +509,14 @@ AcpiOsMapMemory (
|
||||
area_id area;
|
||||
void *there;
|
||||
|
||||
area = map_physical_memory("acpi_physical_mem_area", map_base, ROUNDUP(length + page_offset,B_PAGE_SIZE),B_ANY_KERNEL_BLOCK_ADDRESS,0,&there);
|
||||
area = map_physical_memory("acpi_physical_mem_area", map_base,
|
||||
ROUNDUP(length + page_offset,B_PAGE_SIZE),B_ANY_KERNEL_BLOCK_ADDRESS,0,&there);
|
||||
if (area < 0) {
|
||||
dprintf("ACPI: cannot map memory at %p, length %ld\n", map_base, length);
|
||||
return NULL;
|
||||
}
|
||||
there += page_offset;
|
||||
|
||||
return there;
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user