kernel/vm: Use get_area_page_protection in all cases of _user_get_memory_properties.

It already checks for area->page_protections == NULL and returns
area->protection appropriately if so, we do not need to test specifically
for that here.

No functional change intended.
This commit is contained in:
Augustin Cavalier 2022-03-11 14:18:04 -05:00
parent 5c69be739e
commit 4c51faeb59

View File

@ -6905,11 +6905,7 @@ _user_get_memory_properties(team_id teamID, const void* address,
if (area == NULL)
return B_NO_MEMORY;
uint32 protection = area->protection;
if (area->page_protections != NULL)
protection = get_area_page_protection(area, (addr_t)address);
uint32 protection = get_area_page_protection(area, (addr_t)address);
uint32 wiring = area->wiring;
locker.Unlock();