diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2023-10-04 09:08:32 -0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2023-10-05 13:03:40 +0200 |
commit | b85b4f30846bb169c114e99ceee17cc119f02a4b (patch) | |
tree | 4ee44bae190663bc9b38eb569c4cd9f11fc88f6c /drivers | |
parent | 0f6a90436a5771fc9f6ca0d1e64f7549219e6c3c (diff) | |
download | linux-stable-b85b4f30846bb169c114e99ceee17cc119f02a4b.tar.gz linux-stable-b85b4f30846bb169c114e99ceee17cc119f02a4b.tar.bz2 linux-stable-b85b4f30846bb169c114e99ceee17cc119f02a4b.zip |
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 <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/8fb75157-6c81-4a9c-9992-d73d49902fa8@moroto.mountain
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/0-v2-ee2bae9af0f2+96-iommu_ga_err_ptr_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers')
-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; } |