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 <[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]>
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)