mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-07-19 12:29:02 +02:00
iommu/amd/pgtbl_v2: Improve error handling
[ Upstream commit 36a1cfd497435ba5e37572fe9463bb62a7b1b984 ] Return -ENOMEM if v2_alloc_pte() fails to allocate memory. Signed-off-by: Vasant Hegde <vasant.hegde@amd.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20250227162320.5805-4-vasant.hegde@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
64e88f718e
commit
239afef07e
|
@ -264,7 +264,7 @@ static int iommu_v2_map_pages(struct io_pgtable_ops *ops, unsigned long iova,
|
|||
map_size = get_alloc_page_size(pgsize);
|
||||
pte = v2_alloc_pte(pdom->iop.pgd, iova, map_size, &updated);
|
||||
if (!pte) {
|
||||
ret = -EINVAL;
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user