Skip to contentSkip to conversation

iommu: return error code when it can't get group

PATCH Applied Yang Yingliang 2 participants 2 messages Nov 26, 2020 IOMMU

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 iommu: return error code when it can't get group

It's better to return error code if it can't get group in iommu_probe_device(). It's no function change.

---
 drivers/iommu/iommu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/iommu/iommu.c +3 -1
index b53446bb8c6b..6f4a32df90f6 100644
@@ -253,8 +253,10 @@ int iommu_probe_device(struct device *dev)
 		goto err_out;
 
 	group = iommu_group_get(dev);
-	if (!group)
+	if (!group) {
+		ret = -ENODEV;
 		goto err_release;
+	}
 
 	/*
 	 * Try to allocate a default domain - needs support from the
Signature · 6 lines
2.25.1

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
maintainer Applied
#1 lore raw
Quoted 2 lines · Yang Yingliang

It's better to return error code if it can't get group in iommu_probe_device(). It's no function change.

Applied to arm64 (for-next/iommu/misc), thanks!

[1/1] iommu: return error code when it can't get group

      https://git.kernel.org/arm64/c/058236eef606

Cheers,

Signature · 9 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu