From: Vasant Hegde <vasant.hegde@amd.com>
To: <iommu@lists.linux.dev>, <joro@8bytes.org>
Cc: <will@kernel.org>, <robin.murphy@arm.com>,
<suravee.suthikulpanit@amd.com>,
Vasant Hegde <vasant.hegde@amd.com>
Subject: [PATCH 3/7] iommu/amd/pgtbl_v2: Improve error handling
Date: Tue, 25 Feb 2025 10:53:41 +0000 [thread overview]
Message-ID: <20250225105345.52143-4-vasant.hegde@amd.com> (raw)
In-Reply-To: <20250225105345.52143-1-vasant.hegde@amd.com>
Return -ENOMEM if v2_alloc_pte() fails to allocate memory.
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
---
drivers/iommu/amd/io_pgtable_v2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/amd/io_pgtable_v2.c b/drivers/iommu/amd/io_pgtable_v2.c
index c616de2c5926..a56a27396305 100644
--- a/drivers/iommu/amd/io_pgtable_v2.c
+++ b/drivers/iommu/amd/io_pgtable_v2.c
@@ -254,7 +254,7 @@ static int iommu_v2_map_pages(struct io_pgtable_ops *ops, unsigned long iova,
pte = v2_alloc_pte(cfg->amd.nid, pgtable->pgd,
iova, map_size, gfp, &updated);
if (!pte) {
- ret = -EINVAL;
+ ret = -ENOMEM;
goto out;
}
--
2.31.1
next prev parent reply other threads:[~2025-02-25 10:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 10:53 [PATCH 0/7] iommu/amd: Trivial fixes Vasant Hegde
2025-02-25 10:53 ` [PATCH 1/7] iommu/amd: Log IOMMU control register in event log path Vasant Hegde
2025-02-25 14:26 ` Jason Gunthorpe
2025-02-25 10:53 ` [PATCH 2/7] iommu/amd: Remove unused variable Vasant Hegde
2025-02-25 14:26 ` Jason Gunthorpe
2025-02-25 10:53 ` Vasant Hegde [this message]
2025-02-25 14:27 ` [PATCH 3/7] iommu/amd/pgtbl_v2: Improve error handling Jason Gunthorpe
2025-02-25 10:53 ` [PATCH 4/7] iommu/amd: Remove outdated comment Vasant Hegde
2025-02-25 14:27 ` Jason Gunthorpe
2025-02-25 10:53 ` [PATCH 5/7] iommu/amd: Fix header file Vasant Hegde
2025-02-25 14:28 ` Jason Gunthorpe
2025-02-25 10:53 ` [PATCH 6/7] iommu/amd: Remove unused forward declaration Vasant Hegde
2025-02-25 14:28 ` Jason Gunthorpe
2025-02-25 10:53 ` [PATCH 7/7] iommu/amd: Make protection_domain as static Vasant Hegde
2025-02-25 14:29 ` Jason Gunthorpe
2025-02-25 14:40 ` Vasant Hegde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250225105345.52143-4-vasant.hegde@amd.com \
--to=vasant.hegde@amd.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=robin.murphy@arm.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox