Thread (25 messages) 25 messages, 7 authors, 2018-04-10
STALE2976d REVIEWED: 7 (7M)
Revisions (9)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]
  5. v5 [diff vs current]
  6. v6 [diff vs current]
  7. v6 [diff vs current]
  8. v7 [diff vs current]
  9. v8 current

[PATCH v8 02/14] iommu/rockchip: Fix error handling in probe

From: Jeffy Chen <hidden>
Date: 2018-03-23 07:39:07
Also in: linux-iommu, linux-rockchip, lkml
Subsystem: arm/rockchip soc support, iommu subsystem, the rest · Maintainers: Heiko Stuebner, Joerg Roedel, Will Deacon, Linus Torvalds

Add missing iommu_device_sysfs_remove in error path.

Signed-off-by: Jeffy Chen <redacted>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Acked-by: Robin Murphy <robin.murphy@arm.com>
---

Changes in v8:
Don't introduce the additional return.

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 drivers/iommu/rockchip-iommu.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index e7fb824d123e..73117dbe839e 100644
--- a/drivers/iommu/rockchip-iommu.c
+++ b/drivers/iommu/rockchip-iommu.c
@@ -1193,6 +1193,8 @@ static int rk_iommu_probe(struct platform_device *pdev)
 
 	iommu_device_set_ops(&iommu->iommu, &rk_iommu_ops);
 	err = iommu_device_register(&iommu->iommu);
+	if (err)
+		iommu_device_sysfs_remove(&iommu->iommu);
 
 	return err;
 }
-- 
2.11.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help