Skip to contentSkip to conversation

iommu: Fix return code in iommu_group_alloc_default_domain()

PATCH Applied Jason Gunthorpe 2 participants 2 messages Oct 4, 2023 – Oct 5, 2023 IOMMU

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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")
---
 drivers/iommu/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

v2 use correct base

drivers/iommu/iommu.c +1 -1
index 21d45e6a5931a1..f9f315d58a3a14 100644
@@ -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;
 	}
 

base-commit: 2fa2db14482619122d67d2cdc8633d4a86101d92

Signature · 1 line
2.42.0
Applied
#1 lore raw
Quoted 2 lines · Jason Gunthorpe
 drivers/iommu/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Signature · 10 lines
Jörg Rödel
[email protected]

SUSE Software Solutions Germany GmbH
Frankenstraße 146
90461 Nürnberg
Germany

(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman