Skip to content

Commit

Permalink
iommu/rockchip: Fix error handling in probe
Browse files Browse the repository at this point in the history
Add missing iommu_device_sysfs_remove in error path.

Signed-off-by: Jeffy Chen <[email protected]>
Reviewed-by: Tomasz Figa <[email protected]>
Acked-by: Robin Murphy <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
JeffyCN authored and joergroedel committed Mar 29, 2018
1 parent 98b72b9 commit 6d9ffaa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/iommu/rockchip-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6d9ffaa

Please sign in to comment.