* [PATCH v2] iommu: Fix return code in iommu_group_alloc_default_domain()
@ 2023-10-04 12:08 Jason Gunthorpe
2023-10-05 11:04 ` Joerg Roedel
0 siblings, 1 reply; 2+ messages in thread
From: Jason Gunthorpe @ 2023-10-04 12:08 UTC (permalink / raw)
To: iommu, Joerg Roedel, Robin Murphy, Will Deacon
Cc: Lu Baolu, Dan Carpenter, Joerg Roedel, Jerry Snitselaar
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>
---
drivers/iommu/iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
v2 use correct base
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 21d45e6a5931a1..f9f315d58a3a14 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;
}
base-commit: 2fa2db14482619122d67d2cdc8633d4a86101d92
--
2.42.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] iommu: Fix return code in iommu_group_alloc_default_domain()
2023-10-04 12:08 [PATCH v2] iommu: Fix return code in iommu_group_alloc_default_domain() Jason Gunthorpe
@ 2023-10-05 11:04 ` Joerg Roedel
0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2023-10-05 11:04 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: iommu, Joerg Roedel, Robin Murphy, Will Deacon, Lu Baolu,
Dan Carpenter, Jerry Snitselaar
On Wed, Oct 04, 2023 at 09:08:32AM -0300, Jason Gunthorpe wrote:
> drivers/iommu/iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
--
Jörg Rödel
jroedel@suse.de
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-05 11:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-04 12:08 [PATCH v2] iommu: Fix return code in iommu_group_alloc_default_domain() Jason Gunthorpe
2023-10-05 11:04 ` Joerg Roedel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.