summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/rockchip-iommu.c
diff options
context:
space:
mode:
authorJeffy Chen <jeffy.chen@rock-chips.com>2018-03-23 15:38:02 +0800
committerJoerg Roedel <jroedel@suse.de>2018-03-29 12:22:22 +0200
commit6d9ffaad7eddefaa0a166ba612665aef5264e352 (patch)
tree4fab97120e47db68f015294688297c833418a4d2 /drivers/iommu/rockchip-iommu.c
parent98b72b94def91be0d7918cbba6a150d97047f175 (diff)
downloadlinux-stable-6d9ffaad7eddefaa0a166ba612665aef5264e352.tar.gz
linux-stable-6d9ffaad7eddefaa0a166ba612665aef5264e352.tar.bz2
linux-stable-6d9ffaad7eddefaa0a166ba612665aef5264e352.zip
iommu/rockchip: Fix error handling in probe
Add missing iommu_device_sysfs_remove in error path. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Acked-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/rockchip-iommu.c')
-rw-r--r--drivers/iommu/rockchip-iommu.c2
1 files changed, 2 insertions, 0 deletions
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;
}