Skip to content

Commit b85b4f3

Browse files
jgunthorpejoergroedel
authored andcommitted
iommu: Fix return code in iommu_group_alloc_default_domain()
This function returns NULL on errors, not ERR_PTR. Fixes: 1c68cbc ("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>
1 parent 0f6a904 commit b85b4f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,7 @@ iommu_group_alloc_default_domain(struct iommu_group *group, int req_type)
17871787
*/
17881788
if (ops->default_domain) {
17891789
if (req_type)
1790-
return ERR_PTR(-EINVAL);
1790+
return NULL;
17911791
return ops->default_domain;
17921792
}
17931793

0 commit comments

Comments
 (0)