mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
habanalabs: if map page fails don't try to unmap it
The original code tried to unmap a page that was not mapped as part of the map page error path. Signed-off-by: Dafna Hirschfeld <dhirschfeld@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
committed by
Oded Gabbay
parent
6173572f29
commit
46e49f434f
@@ -403,6 +403,8 @@ int hl_mmu_map_contiguous(struct hl_ctx *ctx, u64 virt_addr,
|
||||
dev_err(hdev->dev,
|
||||
"Map failed for va 0x%llx to pa 0x%llx\n",
|
||||
curr_va, curr_pa);
|
||||
/* last mapping failed so don't try to unmap it - reduce off by page_size */
|
||||
off -= page_size;
|
||||
goto unmap;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user