diff options
| author | Jason Gunthorpe <[email protected]> | 2023-10-04 09:08:32 -0300 |
|---|---|---|
| committer | Joerg Roedel <[email protected]> | 2023-10-05 13:03:40 +0200 |
| commit | b85b4f30846bb169c114e99ceee17cc119f02a4b (patch) | |
| tree | 4ee44bae190663bc9b38eb569c4cd9f11fc88f6c | |
| parent | 0f6a90436a5771fc9f6ca0d1e64f7549219e6c3c (diff) | |
iommu: Fix return code in iommu_group_alloc_default_domain()
This function returns NULL on errors, not ERR_PTR.
Fixes: 1c68cbc64fe6 ("iommu: Add IOMMU_DOMAIN_PLATFORM")
Reported-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
| -rw-r--r-- | drivers/iommu/iommu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 21d45e6a5931..f9f315d58a3a 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -1787,7 +1787,7 @@ iommu_group_alloc_default_domain(struct iommu_group *group, int req_type) */ if (ops->default_domain) { if (req_type) - return ERR_PTR(-EINVAL); + return NULL; return ops->default_domain; } |