Skip to content

Commit 36a1cfd

Browse files
hegdevasantjoergroedel
authored andcommitted
iommu/amd/pgtbl_v2: Improve error handling
Return -ENOMEM if v2_alloc_pte() fails to allocate memory. Signed-off-by: Vasant Hegde <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent e481f8a commit 36a1cfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/amd/io_pgtable_v2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ static int iommu_v2_map_pages(struct io_pgtable_ops *ops, unsigned long iova,
254254
pte = v2_alloc_pte(cfg->amd.nid, pgtable->pgd,
255255
iova, map_size, gfp, &updated);
256256
if (!pte) {
257-
ret = -EINVAL;
257+
ret = -ENOMEM;
258258
goto out;
259259
}
260260

0 commit comments

Comments
 (0)