Optimize XiZi_AIoT FS fd allocation.

This commit is contained in:
TXuian
2024-05-09 16:01:43 +08:00
parent 16a53d4e80
commit b6dd58c629
4 changed files with 8 additions and 7 deletions

View File

@@ -53,7 +53,7 @@ uintptr_t* _page_walk(uintptr_t* pgdir, uintptr_t vaddr, bool alloc)
pgtbl_vaddr = (uintptr_t*)P2V(pgtbl_paddr);
} else {
if (!alloc || !(pgtbl_vaddr = (uintptr_t*)kalloc(sizeof(uintptr_t) * NUM_LEVEL4_PTE))) {
return 0;
return NULL;
}
memset(pgtbl_vaddr, 0, sizeof(uintptr_t) * NUM_LEVEL4_PTE);