Commit 6d9ffaad authored by Jeffy Chen's avatar Jeffy Chen Committed by Joerg Roedel

iommu/rockchip: Fix error handling in probe

Add missing iommu_device_sysfs_remove in error path.
Signed-off-by: default avatarJeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: default avatarTomasz Figa <tfiga@chromium.org>
Acked-by: default avatarRobin Murphy <robin.murphy@arm.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 98b72b94
...@@ -1193,6 +1193,8 @@ static int rk_iommu_probe(struct platform_device *pdev) ...@@ -1193,6 +1193,8 @@ static int rk_iommu_probe(struct platform_device *pdev)
iommu_device_set_ops(&iommu->iommu, &rk_iommu_ops); iommu_device_set_ops(&iommu->iommu, &rk_iommu_ops);
err = iommu_device_register(&iommu->iommu); err = iommu_device_register(&iommu->iommu);
if (err)
iommu_device_sysfs_remove(&iommu->iommu);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment